Skip to content

Add MATCHES / * MATCHES SQL syntax for full-text search#249

Open
tlee732 wants to merge 1 commit intoindextables:mainfrom
tlee732:feature/matches-syntax
Open

Add MATCHES / * MATCHES SQL syntax for full-text search#249
tlee732 wants to merge 1 commit intoindextables:mainfrom
tlee732:feature/matches-syntax

Conversation

@tlee732
Copy link

@tlee732 tlee732 commented Mar 13, 2026

Summary

  • Add MATCHES and * MATCHES as new SQL syntax for full-text search, replacing verbose indexquery/indexqueryall legacy syntax
  • WHERE content MATCHES 'query' → single-column search (maps to IndexQueryExpression)
  • WHERE * MATCHES 'query' → all-fields search (maps to IndexQueryAllExpression)
  • Case-insensitive keyword (MATCHES, matches, Matches all work)
  • Legacy indexquery/indexqueryall syntax remains fully supported
  • Update prettyName/sql/toString on expression classes to use new naming
  • Register MATCHES keyword in IndexTables4SparkExtensions SQL parser

Tests (14 total):

  • 7 parser-level tests (simple, case-insensitive, backtick columns, complex Tantivy syntax, qualified names, * MATCHES basic + case-insensitive)
  • 2 end-to-end small dataset tests (MATCHES and * MATCHES)
  • 2 backward compatibility parser tests (indexquery, indexqueryall)
  • 1 all-syntax comparison test (3-row dataset, 4 syntax variants cross-checked)
  • 1 scale test (100k rows, 3 query types, all 4 syntaxes produce identical results)
  • 1 compound WHERE clause test with 6 sub-cases covering the full matrix:
AND standard filter AND MATCHES OR standard filter OR MATCHES
MATCHES
* MATCHES n/a n/a

Test plan

  • MatchesSyntaxParserTest — 14/14 passed
  • All compound WHERE clause sub-cases cross-checked against legacy syntax equivalents
  • Full make test run (320 local test classes)

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@tlee732 tlee732 force-pushed the feature/matches-syntax branch from f23ec2a to f351ede Compare March 13, 2026 16:38
@tlee732 tlee732 changed the title Complete compound WHERE clause test matrix for MATCHES syntax Add MATCHES / * MATCHES SQL syntax for full-text search Mar 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant