-
Notifications
You must be signed in to change notification settings - Fork 99
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
Fix query validation for metric_time requirements #857
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Current dependencies on/for this PR:
This stack of pull requests is managed by Graphite. |
Thank you for your pull request! We could not find a changelog entry for this change. For details on how to document a change, see the contributing guide. |
As of right now we require metric_time in the group by expression for any metric query against cumulative metrics or derived metrics with time offset windows or an offset_to_grain parameter set. The current query validation was only asserting that some time dimension was included in the group by. In the case of derived metrics, this simply failed later in the query building phase for any query with a different time dimension in the group by expression. In the case of cumulative metrics, this would run an incorrectly rendered query and then return incorrect results. This validation change ensures that users have the proper configuration on queries based on our current limitations.
tlento
force-pushed
the
fix-metric-time-requirement-validation
branch
from
November 8, 2023 23:13
46f9943
to
362d934
Compare
tlento
added
the
Run Tests With Other SQL Engines
Runs the test suite against the SQL engines in our target environment
label
Nov 8, 2023
tlento
temporarily deployed
to
DW_INTEGRATION_TESTS
November 8, 2023 23:13 — with
GitHub Actions
Inactive
tlento
temporarily deployed
to
DW_INTEGRATION_TESTS
November 8, 2023 23:13 — with
GitHub Actions
Inactive
tlento
temporarily deployed
to
DW_INTEGRATION_TESTS
November 8, 2023 23:13 — with
GitHub Actions
Inactive
tlento
temporarily deployed
to
DW_INTEGRATION_TESTS
November 8, 2023 23:13 — with
GitHub Actions
Inactive
WilliamDee
approved these changes
Nov 8, 2023
courtneyholcomb
approved these changes
Nov 8, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
github-actions
bot
removed
the
Run Tests With Other SQL Engines
Runs the test suite against the SQL engines in our target environment
label
Nov 8, 2023
Base automatically changed from
expand-cumulative-and-derived-metric-tests
to
main
November 8, 2023 23:21
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Resolves #825
Description
As of right now we require metric_time in the group by expression
for any metric query against cumulative metrics or derived metrics
with time offset windows or an offset_to_grain parameter set.
The current query validation was only asserting that some time
dimension was included in the group by. In the case of derived
metrics, this simply failed later in the query building phase for
any query with a different time dimension in the group by expression.
In the case of cumulative metrics, this would run an incorrectly
rendered query and then return incorrect results.
This validation change ensures that users have the proper
configuration on queries based on our current limitations.