Skip to content

feat(app): infer a materialized view's minimum date from when it was created - #3740

Draft
alex-fedotyev wants to merge 1 commit into
alex/HDX-6120-trace-rollup-4-mv-indicatorfrom
alex/HDX-6120-trace-rollup-5-mv-min-date
Draft

alex-fedotyev wants to merge 1 commit into
alex/HDX-6120-trace-rollup-4-mv-indicatorfrom
alex/HDX-6120-trace-rollup-5-mv-min-date

Conversation

@alex-fedotyev

@alex-fedotyev alex-fedotyev commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

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 on main, one squashed commit each. Each PR's diff is only its own layer, and CI runs as if each targets main:

  1. fix(app): match the demo traces rollup's dimension columns to its table #3736 Demo traces rollup lists its real dimension columns
  2. fix(common-utils): merge DDSketch and GK quantile states with their accuracy #3737 DDSketch and GK states merge with their accuracy
  3. fix(app): keep search counts exact when a materialized view serves the chart #3738 Search counts stay exact when a view serves them
  4. feat(app): show materialized view acceleration on the trace search RED charts #3739 Acceleration indicator on the trace search RED charts
  5. feat(app): infer a materialized view's minimum date from when it was created #3740 Minimum date inferred from the view's creation time (this PR)

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_time in system.tables), so earlier ranges read the source table. The field stays editable: clear it if the view was backfilled.

Test plan

  • Unit tests: a view created mid-bucket starts at the next bucket, and one created on a bucket boundary starts there. The existing inference tests (no known creation time, several views on one table) still produce no date.
  • app tsc, lint and unit tests.

Part of HDX-6120.

@vercel

vercel Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
hyperdx-oss Ready Ready Preview Nov 20, 2026 6:29am UTC
hyperdx-storybook Ready Ready Preview Nov 20, 2026 6:29am UTC

Request Review

@changeset-bot

changeset-bot Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: eb4e092

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@hyperdx/app Patch
@hyperdx/api Patch
@hyperdx/otel-collector Patch

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

@github-actions

github-actions Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

E2E Test Results

✅ All tests passed • 473 passed • 1 skipped • 1051s

Status Count
✅ Passed 473
❌ Failed 0
⚠️ Flaky 10
⏭️ Skipped 1

Tests ran across 4 shards in parallel.

View full report →

@github-actions

Copy link
Copy Markdown
Contributor

Duplicate code analysis

No new duplicate code introduced by this PR.


jscpd compared this branch against origin/main
across app, api and common-utils. Only new clones are listed; the codebase
currently holds 108 in total (1.13%).
Run yarn dupes locally to reproduce, or yarn dupes:all for the full picture.

…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>

This branch was successfully deployed

2 active deployments
Preview – hyperdx-oss — eb4e0921 Deployed Nov 20, 2026 by vercel[bot]
Preview – hyperdx-storybook — eb4e0921 Deployed Nov 20, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant