Repository navigation
feat: speed up exact filters - #3695
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🦋 Changeset detectedLatest commit: c0a8f48 The changes in this PR will be included in the next version bump. This PR includes changesets to release 4 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 |
🟡 Tier 3 — StandardIntroduces new logic, modifies core functionality, or touches areas with non-trivial risk. Why this tier:
Review process: Full human review — logic, architecture, edge cases. Stats
|
Duplicate code analysis5 new clones introduced by this PR.
If one of these duplicates a helper that already exists, import it instead jscpd compared this branch against |
PR Review
3 finding(s): 🔴 1 P0/P1 · 🟡 1 P2 · 🔵 1 P3 2 posted as inline comment(s) on the changed lines. 1 P3 folded at the bottom. 🔵 1 P3 — no action needed before merge
Priority comes from a separate grading pass over the finished review. P3 is folded here instead of posted inline. No finding blocks merge automatically; a maintainer decides. |
Deep ReviewScope: ✅ No critical issues found. This is a focused, well-tested change. Both SQL paths ( 🟡 P2 -- recommended
🔵 P3 nitpicks (1)
Reviewers (9): correctness, security, adversarial, performance, maintainability, testing, kieran-typescript, project-standards, previous-comments. Testing gaps: none substantive — the diff adds unit coverage for both the direct and CTE SQL paths, faceted-key handling, special-character escaping, the native-columns-uncapped change, and completion-order error propagation, plus an integration test for the shared Map read. No finding blocks merge automatically. A maintainer will expect P0/P1 findings in code this PR changes to be fixed; P2/P3 are your call -- fix or reply. Never fix findings about surrounding code here; reply instead. Do not widen the PR. How to respond |
E2E Test Results✅ All tests passed • 481 passed • 1 skipped • 1178s
Tests ran across 4 shards in parallel. |
2128049 to
6fa2485
Compare
jordan-simonovski
left a comment
There was a problem hiding this comment.
Approved, but left one thing to improve reusability
6fa2485 to
1e116d7
Compare
1e116d7 to
c0a8f48
Compare
Summary
Speeds up exact filters immensely. Should help on both the search and for dashboard filters.
The old queries sent a query asking for many different individual map columns. ClickHouse's behavior is not set up well for that. Keep in mind, Maps are really stored as an array of key value pairs. ClickHouse will
This leads to tons of extra reads, roughly one read per queried key per row. The new behavior is
This means just one walk through the array per row.
Screenshots or video
Before
export-1794928260568-before.mp4
After
export-1794926363019-after.mp4
References