Skip to content

Register match_phrase as a function not a snapshot function #129255

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
Show file tree
Hide file tree
Changes from all commits
Commits
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

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,8 @@ private static FunctionDefinition[][] functions() {
def(Kql.class, uni(Kql::new), "kql"),
def(Match.class, tri(Match::new), "match"),
def(MultiMatch.class, MultiMatch::new, "multi_match"),
def(QueryString.class, bi(QueryString::new), "qstr") } };
def(QueryString.class, bi(QueryString::new), "qstr"),
def(MatchPhrase.class, tri(MatchPhrase::new), "match_phrase") } };

}

Expand All @@ -486,7 +487,6 @@ private static FunctionDefinition[][] snapshotFunctions() {
def(LastOverTime.class, LastOverTime::withUnresolvedTimestamp, "last_over_time"),
def(FirstOverTime.class, FirstOverTime::withUnresolvedTimestamp, "first_over_time"),
def(Term.class, bi(Term::new), "term"),
def(MatchPhrase.class, tri(MatchPhrase::new), "match_phrase"),
def(Knn.class, tri(Knn::new), "knn") } };
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ setup:
- match: {esql.functions.coalesce: $functions_coalesce}
- gt: {esql.functions.categorize: $functions_categorize}
# Testing for the entire function set isn't feasible, so we just check that we return the correct count as an approximation.
- length: {esql.functions: 157} # check the "sister" test below for a likely update to the same esql.functions length check
- length: {esql.functions: 156} # check the "sister" test below for a likely update to the same esql.functions length check

---
"Basic ESQL usage output (telemetry) non-snapshot version":
Expand Down Expand Up @@ -228,7 +228,7 @@ setup:
- gt: {esql.functions.to_long: $functions_to_long}
- match: {esql.functions.coalesce: $functions_coalesce}
- gt: {esql.functions.categorize: $functions_categorize}
- length: {esql.functions: 145} # check the "sister" test above for a likely update to the same esql.functions length check
- length: {esql.functions: 146} # check the "sister" test above for a likely update to the same esql.functions length check

---
took:
Expand Down
Loading