Skip to content

fix: bracket match query display#7796

Merged
jackye1995 merged 1 commit into
lance-format:mainfrom
jackye1995:jack/wrap-metrics-node-name
Jul 15, 2026
Merged

fix: bracket match query display#7796
jackye1995 merged 1 commit into
lance-format:mainfrom
jackye1995:jack/wrap-metrics-node-name

Conversation

@jackye1995

@jackye1995 jackye1995 commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Wrap the MatchQuery query argument in brackets so metric suffixes do not look like part of the query term.

Example verbose metrics output changes from:

MatchQuery: column=content_text, query=government: elapsed=342ms

to:

MatchQuery: column=content_text, query=[government]: elapsed=342ms

Summary by CodeRabbit

  • Style

    • Updated Full Text Search (FTS) execution-plan display for MatchQuery to show the query value in square brackets (e.g., query=[...]) for the default/verbose formats.
  • Tests

    • Updated FTS-related execution-plan expectation strings and snapshots to match the new MatchQuery bracketed formatting across legacy and non-legacy scenarios.

@github-actions github-actions Bot added the bug Something isn't working label Jul 15, 2026
@coderabbitai

coderabbitai Bot commented Jul 15, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The MatchQueryExec display formatter now wraps query values in square brackets, and FTS execution-plan test expectations are updated accordingly.

Changes

MatchQuery display formatting

Layer / File(s) Summary
Update MatchQuery plan formatting
rust/lance/src/io/exec/fts.rs
Default and verbose output now render queries as query=[...] instead of query=....
Align FTS plan expectations
rust/lance/src/dataset/mem_wal/memtable/flush.rs, rust/lance/src/dataset/scanner.rs, rust/lance/src/dataset/tests/dataset_aggregate.rs
FTS plan and aggregate test expectations now use bracketed query values across match, boost, prefilter, unindexed-row, and fast-search cases.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Possibly related PRs

  • lance-format/lance#7788: Refactors MatchQueryExec for element-document granularity and affects related query-plan rendering.

Suggested labels: A-format

Suggested reviewers: wjones127, wkalt, xuanwo

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: bracketing MatchQuery display output.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@jackye1995
jackye1995 force-pushed the jack/wrap-metrics-node-name branch from 2c5f0f9 to 39ac6d5 Compare July 15, 2026 04:41

@wjones127 wjones127 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems inconsistent with existing nodes. You mention that this fixes the metrics output, but there's no example in the PR description nor the unit tests, so it's hard to me to evaluate that.

Comment on lines +1604 to +1605
"AggregateExec: mode=Single, gby=[], aggr=[count(Int32(1))]
MatchQuery: column=text, query=document",
[MatchQuery: column=text, query=document]",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue(blocking): This looks inconsistent with other nodes, which wrap arguments in brackets, not the whole line. See AggregateExec above. Should we wrap the query argument instead?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated to wrap only the query argument, matching the existing argument-bracketing style: MatchQuery: column=text, query=[document].

@jackye1995
jackye1995 force-pushed the jack/wrap-metrics-node-name branch from 39ac6d5 to b90e528 Compare July 15, 2026 19:44
@jackye1995
jackye1995 merged commit 64c560a into lance-format:main Jul 15, 2026
39 of 41 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants