Repository navigation
feat: add per-source row key override for the side-panel row lookup - #3673
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🦋 Changeset detectedLatest commit: 3bf0c20 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 4 — CriticalTouches authentication, tenancy data models, the public API or shipped database config — or substantially changes the query rendering engine, background tasks, the OTel pipeline, image build, or release CI. Why this tier:
Review process: Deep review from a domain expert. Synchronous walkthrough may be required. Stats
|
Duplicate code analysisNo new duplicate code introduced by this PR. jscpd compared this branch against |
Add an optional rowKeyExpression to log and trace sources. When set, the row lookup selects and filters on only those expressions (plus their column references) and skips the table metadata, columns, and MergeTree settings queries. This covers sources whose table metadata hides the keys, e.g. Distributed over Merge over SharedMergeTree, where the lookup otherwise falls back to a full-row WHERE including Body. Also exposed in MCP and the external API docs. Unset sources behave as before.
9a87746 to
3bf0c20
Compare
E2E Test Results✅ All tests passed • 465 passed • 1 skipped • 990s
Tests ran across 4 shards in parallel. |
PR Review
5 finding(s): 🔴 0 critical · 🟠 0 major · 🔵 5 minor 4 posted as inline comment(s) on the changed lines. 1 listed below. Findings outside the changed lines1 minor
Severity is the reviewer's own estimate and is used for ordering, not filtering. No finding blocks merge automatically; a maintainer decides. |
Deep Review✅ No critical issues found. The change is well-scoped and additive: when
🔵 P3 nitpicks (4)
Reviewers (2): maintainability, kieran-typescript — plus orchestrator verification of the correctness, API-contract, and adversarial paths (empty-WHERE robustness, 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 |
Summary
Adds an optional "Row key expression" to log and trace sources. When set, the side panel's row lookup selects and filters on only those columns.
For tables like
Distributed → Distributed → Merge → SharedMergeTree, the top table reports empty keys, so the lookup falls back to a WHERE on every selected column, includingBody, sent to every region.rowKeyExpressionadded to the log and trace source schemas and the Mongoose model.useConfigWithAdditionalSelectappends the expressions to the select as hidden columns and builds the row WHERE from them and their column references. It skips the table metadata, columns, and MergeTree settings queries.clickstack_save_source/clickstack_describe_sourceand in the external v2 OpenAPI docs.Backport of the EE change. Only difference: the form fields pass
tableConnection/controlinline, since OSS has nocommonPropshelper.How to reproduce
On
main:On this branch:
Timestamp, ServiceNameand save.How to test on Vercel preview
Preview routes: /search
Steps:
Timestamp, ServiceNamein "Row key expression" and save the source.References