Repository navigation
fix: Fix table sorting for formula, group by, and multi-series metric aliases - #3748
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🦋 Changeset detectedLatest commit: cb29867 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:
Additional context: touches the query rendering engine lightly (25 lines, under the 150-line bar for Tier 4) Review process: Full human review — logic, architecture, edge cases. Stats
|
Duplicate code analysisNo new duplicate code introduced by this PR. jscpd compared this branch against |
PR Review
2 finding(s): 🔴 0 P0/P1 · 🟡 1 P2 · 🔵 1 P3 None could be anchored to changed lines; they are listed below. 1 P3 folded at the bottom. Findings outside the changed lines
🔵 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 Review✅ No critical issues found. The ORDER BY quoting logic was traced across every branch (composed metric, series-alias-by-name, formula operands shown/hidden, group-by with/without alias, histogram packing, ratio merge) and the emitted SQL matches 🟡 P2 -- recommended
🔵 P3 nitpicks (6)
Reviewers (5): correctness, testing, maintainability, kieran-typescript, adversarial. Pre-existing (not counted toward verdict): Testing gaps:
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 • 477 passed • 1 skipped • 1049s
Tests ran across 4 shards in parallel. |
|
This PR currently has a merge conflict. Please resolve this and then re-add the |
89ff875 to
d597f87
Compare
|
This PR currently has a merge conflict. Please resolve this and then re-add the |
…able-order-quoting # Conflicts: # packages/app/src/components/DBTable/__tests__/sorting.test.ts
Summary
Problem: Clicking the header of a table chart column whose name is an alias in the SQL (for example "duration min") could send an invalid ORDER BY. This happened for formula columns, aliased group-bys, and multi-series metric queries. Before, only series aliases were quoted.
Fix:
Screenshots or video
Before
Screen.Recording.2026-11-20.at.2.53.56.PM.mov
After
Screen.Recording.2026-11-20.at.2.55.47.PM.mov
How to test on Vercel preview
Follow the steps from the videos
References