This is the main behavior change for this feature. Here, we apply the MetricTimeDefaultGranularityPattern for group by and filter resolution so that metric_time defaults to the default granularity instead of the minimum one.
There is one case where we actually want the minimum granularity instead of the default granularity for metric_time, which is when determining the granularity used to adjust time constraints. The only_use_minimum_grain flag is used for that purpose.
Note that very few tests are impacted by this change because default_granularity defaults to DAY or the minimum granularity for a time dimension if it's not set on the metric. This is the same behavior as before since no time dimensions have been added to our tests with sub-daily granularity yet. In an upcoming PR I will have tests that add default_granularity to some metrics to see the changes.
You will see a handful snapshot changes here. These reflect an intentional behavior change (agreed on by product) in which we don't error if metric_time is queried for metrics with two different default granularities. Instead, we use the larger of the two default_granularities, which is guaranteed to work for both metrics.
This is the main behavior change for this feature. Here, we apply the
MetricTimeDefaultGranularityPattern
for group by and filter resolution so thatmetric_time
defaults to the default granularity instead of the minimum one.There is one case where we actually want the minimum granularity instead of the default granularity for
metric_time
, which is when determining the granularity used to adjust time constraints. Theonly_use_minimum_grain
flag is used for that purpose.Note that very few tests are impacted by this change because
default_granularity
defaults toDAY
or the minimum granularity for a time dimension if it's not set on the metric. This is the same behavior as before since no time dimensions have been added to our tests with sub-daily granularity yet. In an upcoming PR I will have tests that adddefault_granularity
to some metrics to see the changes.You will see a handful snapshot changes here. These reflect an intentional behavior change (agreed on by product) in which we don't error if
metric_time
is queried for metrics with two different default granularities. Instead, we use the larger of the twodefault_granularities
, which is guaranteed to work for both metrics.