Repository navigation
Conversation
|
@ralaruri is attempting to deploy a commit to the HyperDX Team on Vercel. A member of the Team first needs to authorize it. |
🦋 Changeset detectedLatest commit: d5be2e2 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 |
…re-escaped Adding a second filter re-escaped every key in the filter state. toClickHouseKeyExpression treated a dotted key under a native JSON column as a Map key and rewrote it to col['key'], which ClickHouse rejects: 'First argument for function arrayElement must be array, got JSON'. Pass the table's JSON column names into escapeFilterStateKeys and toQuotedClickHouseKeyExpression, so keys under a JSON column are written as toString(`col`.`a`.`b`), the form the row panel already produces. Array subscripts in a path (`col`.`a`[1]) stay subscripts. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The row panel wrote array positions inside a native JSON column as quoted keys (col.`events`.`0`.`id`). ClickHouse finds no such key, so the filter silently matched no rows. Array elements are addressed with 1-based subscripts (col.`events`[1].`id`). mergePath takes an optional set of array positions and writes [N+1] there for JSON columns. The row viewer derives the positions from the row data. Callers that pass no positions keep numeric segments as quoted keys, which facet keys from the JSON schema rely on. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
ralaruri
force-pushed
the
fix/json-array-paths
branch
from
November 12, 2026 20:26
102cc8d to
d5be2e2
Compare
This branch has not been 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.
Summary
Based on #3641. Until that merges, this PR's diff includes its commit; the change for this PR is the last commit only.
"Add to Filters" on a value inside an array in a native
JSONcolumn returns no rows and shows no error. The row panel writes array positions as quoted keys,message.`events`.`0`.`detail`.`parameters`.`1`.`value`. ClickHouse finds no such key. Array elements need 1-based subscripts:message.`events`[1].`detail`.`parameters`[2].`value`.mergePathtakes an optional set of array positions and writes[N+1]there for JSON columns. The row viewer works out the positions by walking the row data it already holds. Callers that pass no positions are unchanged: numeric segments stay quoted keys, which facet keys from the JSON schema rely on (a test pins this).Limitation: positions come from the row as displayed. If the viewer hides blank values, array positions can shift, as they already can for Array columns.
Tests:
mergePathcases (array positions, nested arrays, a numeric object key that must stay quoted) and tests for the newgetArrayIndexPositionshelper. They fail onmainand pass here.tscand the related jest suites pass.Screenshots or video
How to reproduce
Starting point: same setup as #3641 and #3640, with rows like this instead:
{"email":"user@example.test","events":[{"name":"event_a","detail":{"parameters":[{"name":"param_1","value":"x"},{"name":"param_2","value":"EMAIL_SERVICE"}]}}]}On
main:message→events→0→detail→parameters→1. Hovervalueand click the filter icon.</>, the filter usesmessage.`events`.`0`…`parameters`.`1`.`value`.On this branch:
</>, the filter uses`events`[1]and`parameters`[2].How to test on Vercel preview
N/A. It needs a source with a native JSON column.
References