milvus/internal/parser/planparserv2
Jiquan Long e549148a19
enhance: full-support for wildcard pattern matching (#30288)
issue: #29988 
This pr adds full-support for wildcard pattern matching from end to end.
Before this pr, the users can only use prefix match in their expression,
for example, "like 'prefix%'". With this pr, more flexible syntax can be
combined.

To do so, this pr makes these changes:
- 1. support regex query both on index and raw data;
- 2. translate the pattern matching to regex query, so that it can be
handled by the regex query logic;
- 3. loose the limit of the expression parsing, which allows general
pattern matching syntax;

With the support of regex query in segcore backend, we can also add
mysql-like `REGEXP` syntax later easily.

---------

Signed-off-by: longjiquan <jiquan.long@zilliz.com>
2024-02-01 12:37:04 +08:00
..
generated Support array datatype (#26369) 2023-09-19 14:23:23 +08:00
Plan.g4 Support array datatype (#26369) 2023-09-19 14:23:23 +08:00
README.md Auto generate parser code (#26716) 2023-08-31 11:13:01 +08:00
check_identical.go Add float16 vector (#25852) 2023-09-08 10:03:16 +08:00
check_identical_test.go Format the code (#27275) 2023-09-21 09:45:27 +08:00
error_listener.go Support antlr as plan parser (#16696) 2022-05-06 17:43:51 +08:00
floating_comparision.go Support antlr as plan parser (#16696) 2022-05-06 17:43:51 +08:00
floating_comparision_test.go Support antlr as plan parser (#16696) 2022-05-06 17:43:51 +08:00
generate.go Auto generate parser code (#26716) 2023-08-31 11:13:01 +08:00
generate.sh Auto generate parser code (#26716) 2023-08-31 11:13:01 +08:00
logical_expr_visitor.go Support antlr as plan parser (#16696) 2022-05-06 17:43:51 +08:00
node_ret.go Fix expression incompatible between parser and executor (#26493) 2023-08-21 19:36:20 +08:00
operators.go Use go-api/v2 for milvus-proto (#24770) 2023-06-09 01:28:37 +08:00
parser_visitor.go Format the code (#27275) 2023-09-21 09:45:27 +08:00
pattern_match.go enhance: full-support for wildcard pattern matching (#30288) 2024-02-01 12:37:04 +08:00
pattern_match_test.go enhance: full-support for wildcard pattern matching (#30288) 2024-02-01 12:37:04 +08:00
plan_parser_v2.go Add float16 approve for multi-type part (#28427) 2024-01-11 15:48:51 +08:00
plan_parser_v2_test.go enhance: full-support for wildcard pattern matching (#30288) 2024-02-01 12:37:04 +08:00
pool.go Format the code (#27275) 2023-09-21 09:45:27 +08:00
pool_test.go Format the code (#27275) 2023-09-21 09:45:27 +08:00
show_visitor.go Format the code (#27275) 2023-09-21 09:45:27 +08:00
utils.go fix: Fix bug for parsing expression that include quotes (#28416) 2023-11-23 17:18:32 +08:00
utils_test.go fix: Fix bug for parsing expression that include quotes (#28416) 2023-11-23 17:18:32 +08:00

README.md

Generate Parser with Antlr4

Install Antlr4

Please follow install antlr4 to install the antlr tool.

The version of antlr tool: 4.9.

Code Generate

After you install the antlr4, you can generate the parser code in golang with:

go generate

All generated code will be under directory generated.