-
Notifications
You must be signed in to change notification settings - Fork 97
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
Support custom granularity in linkable spec resolution #1415
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
courtneyholcomb
force-pushed
the
court/parse-custom-3
branch
from
September 20, 2024 22:04
40965c4
to
6ab9be4
Compare
courtneyholcomb
changed the title
Check query tests for custom granularity
Support custom granularity in linkable spec resolution
Sep 20, 2024
courtneyholcomb
force-pushed
the
court/parse-custom-3
branch
from
September 20, 2024 22:16
6ab9be4
to
89f3a74
Compare
courtneyholcomb
force-pushed
the
court/parse-custom-2
branch
from
September 24, 2024 13:54
81cbd20
to
05a0296
Compare
courtneyholcomb
force-pushed
the
court/parse-custom-3
branch
from
September 24, 2024 13:55
89f3a74
to
c5cc48a
Compare
courtneyholcomb
force-pushed
the
court/parse-custom-2
branch
2 times, most recently
from
September 24, 2024 17:22
5751872
to
d78a350
Compare
courtneyholcomb
force-pushed
the
court/parse-custom-3
branch
from
September 24, 2024 17:24
c5cc48a
to
8795dd1
Compare
@@ -27,6 +27,8 @@ class LinkableElementProperty(Enum): | |||
METRIC_TIME = "metric_time" | |||
# Refers to a metric, not a dimension. | |||
METRIC = "metric" | |||
# An time dimension with a DatePart. |
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.
nit: I think you meant "A" not "An" here, right? (Or is this a convention I'm not aware of?)
tlento
approved these changes
Sep 24, 2024
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.
courtneyholcomb
force-pushed
the
court/parse-custom-2
branch
from
September 24, 2024 22:12
d78a350
to
dd1d57e
Compare
…ution Cumulative metrics CAN be queried with non-default granularity now, so remove that restriction. This was not an issue in actual queries because that logic was only hit when querying metadata, but this old logic could result in a bug when listing dimensions for a cumulative metric. Instead, restrict cumulative metrics from being used with date part, which matches existing query behavior. This required adding a DATE_PART LinkableElementProperty and updating LinkableDimensions accordingly.
Also updates related date part properties.
This logic is only hit for certain types of metrics (like cumulative and derived metrics) so I didn't catch it until adding tests for those metric types.
courtneyholcomb
force-pushed
the
court/parse-custom-3
branch
from
September 24, 2024 22:40
a4ad053
to
8044a40
Compare
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.
Further updates to linkable spec resolution needed to support custom granularities.
This also fixes a bug related to cumulative metric restrictions: Cumulative metrics CAN be queried with non-default granularity now, so this removes that restriction. This was not an issue in actual queries because that logic was only hit when querying metadata, but it could result in a bug when listing dimensions for a cumulative metric. Instead of restricting derived time granularity, restrict cumulative metrics from being used with date part (this matches existing query behavior). This change required adding a
DATE_PART
LinkableElementProperty
and updatingLinkableDimensions
accordingly, so that's what you'll see in the snapshot changes.