Skip to content

Commit a262eb6

Browse files
authored
Add ESQL match function (#113374)
1 parent 5f3595b commit a262eb6

File tree

41 files changed

+3435
-2273
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+3435
-2273
lines changed

docs/changelog/113374.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 113374
2+
summary: Add ESQL match function
3+
area: ES|QL
4+
type: feature
5+
issues: []

docs/reference/esql/functions/description/match.asciidoc

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/reference/esql/functions/examples/match.asciidoc

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/reference/esql/functions/kibana/definition/match.json

Lines changed: 85 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/reference/esql/functions/kibana/docs/match.md

Lines changed: 14 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/reference/esql/functions/layout/match.asciidoc

Lines changed: 17 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/reference/esql/functions/parameters/match.asciidoc

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/reference/esql/functions/signature/match.svg

Lines changed: 1 addition & 0 deletions
Loading

docs/reference/esql/functions/types/match.asciidoc

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

x-pack/plugin/esql-core/src/main/java/org/elasticsearch/xpack/esql/core/expression/TypeResolutions.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -155,18 +155,19 @@ public static TypeResolution isNotNullAndFoldable(Expression e, String operation
155155
return resolution;
156156
}
157157

158-
public static TypeResolution isNotFoldable(Expression e, String operationName, ParamOrdinal paramOrd) {
159-
if (e.foldable()) {
158+
public static TypeResolution isNotNull(Expression e, String operationName, ParamOrdinal paramOrd) {
159+
if (e.dataType() == DataType.NULL) {
160160
return new TypeResolution(
161161
format(
162162
null,
163-
"{}argument of [{}] must be a table column, found constant [{}]",
163+
"{}argument of [{}] cannot be null, received [{}]",
164164
paramOrd == null || paramOrd == DEFAULT ? "" : paramOrd.name().toLowerCase(Locale.ROOT) + " ",
165165
operationName,
166166
Expressions.name(e)
167167
)
168168
);
169169
}
170+
170171
return TypeResolution.TYPE_RESOLVED;
171172
}
172173

0 commit comments

Comments
 (0)