Skip to content

Add ESQL match function #113374

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 107 commits into from
Oct 14, 2024
Merged
Changes from 1 commit
Commits
Show all changes
107 commits
Select commit Hold shift + click to select a range
ab5852c
First version
carlosdelest Sep 20, 2024
35573a3
Wire up for capabilities and function registry
carlosdelest Sep 20, 2024
b2fc887
Minor text message change
carlosdelest Sep 20, 2024
fdbd226
Changed hierarchy to allow for more expressions besides query
carlosdelest Sep 20, 2024
e4c1fbe
Change name to matchstr in registry
carlosdelest Sep 20, 2024
9c93412
Added VerifierTests for matchstr
carlosdelest Sep 20, 2024
f48d648
Fix TypeResolution method
carlosdelest Sep 20, 2024
58e1eee
Accept only a field as a first argument
carlosdelest Sep 23, 2024
242d993
Add CSV tests
carlosdelest Sep 23, 2024
11b59f0
Modified type errors to include source and not function name
carlosdelest Sep 23, 2024
0acd604
Don't do CSV tests for match function
carlosdelest Sep 23, 2024
7957382
Add MatchFunctionTests
carlosdelest Sep 23, 2024
3b28cc9
Add generated docs
carlosdelest Sep 23, 2024
c9449c7
Make PR easier to read
carlosdelest Sep 23, 2024
1fa0c60
Minor refactorings for better javadoc and subclass structure for Full…
carlosdelest Sep 23, 2024
f88bf30
Spotless
carlosdelest Sep 23, 2024
880b4e6
Check function defined in tests
carlosdelest Sep 25, 2024
5718d68
Merge branch 'main' into carlosdelest/esql-match-function
carlosdelest Sep 25, 2024
e23eef3
Rename match operator to matchstr
carlosdelest Sep 25, 2024
862374d
Rename matchstr function to match
carlosdelest Sep 25, 2024
f9371b1
Rename matchstr function to match
carlosdelest Sep 25, 2024
0a05d5b
Rename match operator to matchstr
carlosdelest Sep 25, 2024
6601dfa
Don't run REST compat test for match operator
carlosdelest Sep 25, 2024
dd6df12
Revert "Rename match operator to matchstr"
carlosdelest Sep 26, 2024
16d88b0
Revert "Rename match operator to matchstr"
carlosdelest Sep 26, 2024
9e32c8e
Adds MATCH as a valid function identifier to make it compatible with …
carlosdelest Sep 26, 2024
3297ea5
Merge branch 'main' into carlosdelest/esql-match-function
carlosdelest Sep 26, 2024
953b276
Removed unnecessary code
carlosdelest Sep 26, 2024
2877688
Final removal of previous renames
carlosdelest Sep 26, 2024
274c94f
Update docs/changelog/113374.yaml
carlosdelest Sep 26, 2024
a468d46
Match function needs to take into account field information instead o…
carlosdelest Sep 27, 2024
a0f2c7d
Add verifier tests - remove tests for executing after commands for ma…
carlosdelest Sep 27, 2024
d1c0978
Add tests for using match() after commands
carlosdelest Sep 27, 2024
cde3411
Spotless
carlosdelest Sep 27, 2024
f21e7bc
Merge branch 'main' into carlosdelest/esql-match-function
carlosdelest Sep 27, 2024
c1bc3be
Fix tests
carlosdelest Sep 30, 2024
3027f2c
Check that conditions in full text functions are all pushable to Lucene
carlosdelest Sep 30, 2024
9fcb0ac
Add LocalPhysicalPlanOptimizerTests for match function
carlosdelest Sep 30, 2024
1358ef7
Remove test with non-pushed down function
carlosdelest Sep 30, 2024
a9d6d3c
Merge branch 'main' into carlosdelest/esql-match-function
carlosdelest Sep 30, 2024
b19751e
Change function description
carlosdelest Sep 30, 2024
9762245
Right, Spotless
carlosdelest Sep 30, 2024
0cf99be
Reword error message
carlosdelest Oct 1, 2024
8760992
Improve condition performance
carlosdelest Oct 1, 2024
67a9fb0
Refactor checks for asQuery() method
carlosdelest Oct 1, 2024
a976d2c
Fix docs
carlosdelest Oct 1, 2024
1ceee62
Merge branch 'main' into carlosdelest/esql-match-function
carlosdelest Oct 1, 2024
41dc6d3
Refactor verifier code
carlosdelest Oct 1, 2024
5a8a4f5
Implement Validatable for checking that field is an Elasticsearch field
carlosdelest Oct 2, 2024
79cd897
Grammar changes from PR review
carlosdelest Oct 2, 2024
7851172
Change FullTextFunction constructor signature
carlosdelest Oct 2, 2024
e444978
Centralize writeTo in FullTextFunction
carlosdelest Oct 2, 2024
70ad4b0
Rename resolveQueryType, add javadoc
carlosdelest Oct 2, 2024
1380c70
Distinguish between MatchFunction and QueryStringFunction for pushing…
carlosdelest Oct 2, 2024
fedefce
Remove hasFieldsInformation() and revert to an instanceof comparison
carlosdelest Oct 2, 2024
1c500dd
Move up method
carlosdelest Oct 2, 2024
dcc8bf6
Move up method
carlosdelest Oct 2, 2024
8b646a8
Remove unnecessary variable
carlosdelest Oct 2, 2024
b97aaf6
Fix deserialization
carlosdelest Oct 2, 2024
fc58631
Reimplement conditions to check for disjunctions
carlosdelest Oct 3, 2024
97a6cf8
Add tests for new checks
carlosdelest Oct 3, 2024
2e3e0a0
Refactor checks using new Node method
carlosdelest Oct 3, 2024
e5ce220
Adding disjunction tests
carlosdelest Oct 3, 2024
71be479
Spotless
carlosdelest Oct 3, 2024
42fb0ce
Merge branch 'main' into carlosdelest/esql-match-function
carlosdelest Oct 3, 2024
1f228d2
Reverted serialization change
carlosdelest Oct 3, 2024
233528d
Add multivalued fields tests
carlosdelest Oct 4, 2024
98db692
Refactor check into separate method
carlosdelest Oct 4, 2024
5f31399
Remove duplicate tests
carlosdelest Oct 4, 2024
9dac2c6
Add unsupported behaviour tests, and add limit checks for match function
carlosdelest Oct 4, 2024
3aa66af
Add mixed query string / match function CSV test
carlosdelest Oct 4, 2024
44b2f33
Merge branch 'main' into carlosdelest/esql-match-function
carlosdelest Oct 4, 2024
141ddda
Add assumeTrue check in test
carlosdelest Oct 7, 2024
a25db90
Additional test for keyword fields being pushable to Lucene
carlosdelest Oct 7, 2024
419b8fb
Removed duplicate tests
carlosdelest Oct 7, 2024
80311e2
Remove unnecessary concatenation
carlosdelest Oct 7, 2024
22b009e
Merge branch 'main' into carlosdelest/esql-match-function
elasticmachine Oct 8, 2024
c433aa1
Move disjunctions check from Verifier to the LocalPhysicalVerifier
carlosdelest Oct 8, 2024
2200f4d
Remove unneeded test
carlosdelest Oct 8, 2024
deb539b
Add disjunction that is pushable
carlosdelest Oct 8, 2024
e27c112
Spotless
carlosdelest Oct 8, 2024
c803d1b
Merge remote-tracking branch 'carlosdelest/carlosdelest/esql-match-fu…
carlosdelest Oct 8, 2024
75161bb
Merge branch 'main' into carlosdelest/esql-match-function
elasticmachine Oct 8, 2024
cc32930
Replace getFirst() for get(0)
carlosdelest Oct 8, 2024
2ddcbb5
Replace getFirst() for get(0), change children list order
carlosdelest Oct 8, 2024
87dcd7f
Regenerated from tests
carlosdelest Oct 8, 2024
19f0546
Removed MATCH command from the lexer
carlosdelest Oct 8, 2024
06f2eaf
Moved query generation to EsqlExpressionTranslators, simplified class…
carlosdelest Oct 8, 2024
097c8f7
Revert "Move disjunctions check from Verifier to the LocalPhysicalVer…
carlosdelest Oct 8, 2024
b1ed0db
Revert "Add disjunction that is pushable"
carlosdelest Oct 8, 2024
7ed7975
Revert "Remove unneeded test"
carlosdelest Oct 8, 2024
96fe431
Remove LocalPhysicalVerifier
carlosdelest Oct 8, 2024
c5a26e6
Merge remote-tracking branch 'carlosdelest/carlosdelest/esql-match-fu…
carlosdelest Oct 8, 2024
e4cb62c
Fix usage after ROW for match function
carlosdelest Oct 8, 2024
11cdb85
Reverted row change
carlosdelest Oct 9, 2024
937ddf1
FullTextFunctions are not nullable
carlosdelest Oct 9, 2024
871cb02
Merge branch 'main' into carlosdelest/esql-match-function
carlosdelest Oct 9, 2024
2ff3ec5
Regenerate lexer / parser with changes from main
carlosdelest Oct 9, 2024
43d2463
Additional assumeTrue that were missing
carlosdelest Oct 9, 2024
0dd782c
Full text functions can't be used as part of OR conditions
carlosdelest Oct 9, 2024
d4e6256
Change QueryStringFunction and MatchFunction to QueryString and Match
carlosdelest Oct 9, 2024
03a0246
Moved forEachParent method from Node to Verifier
carlosdelest Oct 9, 2024
87807ed
Moved verification tests to LogicalPlanOptimizerTests
carlosdelest Oct 9, 2024
2e5ce4e
Simplified checking of full text function parents
carlosdelest Oct 9, 2024
0045703
Merge branch 'main' into carlosdelest/esql-match-function
elasticmachine Oct 10, 2024
3c0c3be
Merge branch 'main' into carlosdelest/esql-match-function
carlosdelest Oct 11, 2024
38a6136
Fix merge
carlosdelest Oct 11, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Don't do CSV tests for match function
  • Loading branch information
carlosdelest committed Sep 23, 2024
commit 0acd6044b8ff268c61dd1e44b370481d5381cc82
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,10 @@ public final void test() throws Throwable {
"can't use QSTR function in csv tests",
testCase.requiredCapabilities.contains(EsqlCapabilities.Cap.QSTR_FUNCTION.capabilityName())
);
assumeFalse(
"can't use MATCHSTR function in csv tests",
testCase.requiredCapabilities.contains(EsqlCapabilities.Cap.MATCH_FUNCTION.capabilityName())
);

if (Build.current().isSnapshot()) {
assertThat(
Expand Down