rill icon indicating copy to clipboard operation
rill copied to clipboard

fix: min time grain derivation

Open briangregoryholmes opened this issue 6 months ago • 1 comments

INSERT DESCRIPTION HERE

Checklist:

  • [ ] Covered by tests
  • [ ] Ran it and it works as intended
  • [ ] Reviewed the diff before requesting a review
  • [ ] Checked for unhandled edge cases
  • [ ] Linked the issues it closes
  • [ ] Checked if the docs need to be updated. If so, create a separate Linear DOCS issue
  • [ ] Intend to cherry-pick into the release branch
  • [ ] I'm proud of this work!

briangregoryholmes avatar Jun 16 '25 21:06 briangregoryholmes

I had the logic flipped, so it was pulling the smallest of the smallest time grains rather than the largest. That shouldn't have caused a direct regression, but may have had similar effects.

To sum:

The original issue was created because there could be a mismatch between two smallest_time_grain values. There should be no regression with that issue because of this PR.

This new PR was created because when all upstream metrics views didn't have a smallest_time_grain set, it was being set to TIME_GRAIN_YEAR

There's another issue that should not be addressed in this PR where when you are looking at a range that is shorter than your smallest_time_grain, we don't show any options in the dropdown. This is true on Explore as well. The solutions to that should not be part of this PR.

briangregoryholmes avatar Jun 17 '25 12:06 briangregoryholmes

Can/should this PR be merged @briangregoryholmes?

ericpgreen2 avatar Jul 15 '25 13:07 ericpgreen2