fix(index): decline incompatible JSON accessor paths - #9260
Open
lance-gatefixer[bot] wants to merge 1 commit into
Open
lance-gatefixer[bot] wants to merge 1 commit into
lance-gatefixer[bot] wants to merge 1 commit into
Conversation
Contributor
There was a problem hiding this comment.
✅ Gate recommendation: approve.
The guard matches the actual semantic boundary: only an unchanged bare object key is shared by JSONPath training and typed-accessor lookup, while root-prefixed, nested, normalized, and numeric spellings now fall back to correct scans. This preserves safe bare-key acceleration without broadening accessor semantics, and the parser/routing plus indexed-versus-unindexed regressions cover the boundary.
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
Root cause
JSON index training evaluates the configured path as full JSONPath, but typed accessors perform a single literal object-key lookup or root-array index lookup. The query router matched only the path spelling, so incompatible expressions such as
$.user.agecould query nested index keys even though the unindexed accessor looked for a literal top-level key.Validation
cargo fmt --allcargo clippy --all --tests --benches -- -D warningscargo test -p lance-index test_path_matches_typed_accessorcargo test -p lance-index test_expressions -- --nocapturecargo test -p lance-index test_multi_json_indices_route_by_pathcargo test -p lance test_nested_json_path_typed_accessor_matches_unindexed_resultscargo test -p lance test_json_extract_matches_unindexed_resultsFixes #9257