Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor follow ups to measure filter API changes #3779

Merged
merged 1 commit into from
Jan 5, 2024

Conversation

AdityaHegde
Copy link
Collaborator

While adding UI support for measure filters and the new filter format some changes were needed to not crash the API.

  • Adding some empty checks here.
  • Also updating dashboard url state to keep go changes separate.

Comment on lines +508 to +510
if strings.TrimSpace(havingClause) != "" {
havingClause = "HAVING " + havingClause
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It already checks that q.Having != nil – how can the it evaluate to an empty having clause if it's not nil?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is to gracefully handle cases with empty AND/OR or IN filters.

@AdityaHegde AdityaHegde merged commit 6622298 into main Jan 5, 2024
7 checks passed
@AdityaHegde AdityaHegde deleted the having-filter-fixes branch January 5, 2024 04:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants