Repository navigation
feat(app): infer a materialized view's minimum date from when it was created - #3740
Draft
alex-fedotyev wants to merge 1 commit into
Draft
alex-fedotyev wants to merge 1 commit into
alex-fedotyev wants to merge 1 commit into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🦋 Changeset detectedLatest commit: eb4e092 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Contributor
E2E Test Results✅ All tests passed • 473 passed • 1 skipped • 1051s
Tests ran across 4 shards in parallel. |
Contributor
Duplicate code analysisNo new duplicate code introduced by this PR. jscpd compared this branch against |
…created A materialized view only captures rows inserted after it exists. Without a minimum date the optimizer treats it as complete for any range, so charts over earlier ranges read a view that started empty and undercounted. Inferring the configuration in the source form now sets the minimum date to the first whole bucket after the view's creation time, so those ranges read the source table. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
alex-fedotyev
force-pushed
the
alex/HDX-6120-trace-rollup-5-mv-min-date
branch
from
November 20, 2026 06:27
1ca69b3 to
eb4e092
Compare
This branch was successfully deployed
This file contains hidden or 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
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.
Stack
Layer 5 of 5 in a GitHub stack (stack #3741). GitHub shows each layer's base as the branch below it, but the stack's base is
main: merging any PR lands it and every PR below it onmain, one squashed commit each. Each PR's diff is only its own layer, and CI runs as if each targetsmain:The layers are independent fixes to how charts read materialized views, ordered so the smallest land first. They prepare for a default trace rollup, which comes in a follow-up stack.
Summary
A materialized view only captures rows inserted after it's created. Without a minimum date, the optimizer treats a view as complete for any range, so a chart that starts before the view existed reads a view that started empty, and undercounts. Registering a view right after creating it, which is the usual flow, hits this every time.
When the source form infers a view's configuration, it now sets Minimum Date to the first whole bucket after the view was created (the view's
metadata_modification_timeinsystem.tables), so earlier ranges read the source table. The field stays editable: clear it if the view was backfilled.Test plan
tsc, lint and unit tests.Part of HDX-6120.