Skip to content

Commit 644874f

Browse files
committed
introduce capability
1 parent 2c83925 commit 644874f

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

x-pack/plugin/esql/qa/testFixtures/src/main/resources/hash.csv-spec

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
md5
2+
required_capability: kql_function
3+
24
ROW value = "test" | EVAL hash = hash("md5", value);
35

46
value:keyword | hash:keyword
57
test | 098f6bcd4621d373cade4e832627b4f6
68
;
79

810
sha256
11+
required_capability: kql_function
12+
913
ROW value = "test" | EVAL hash = hash("sha256", value);
1014

1115
value:keyword | hash:keyword

x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/action/EsqlCapabilities.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -424,6 +424,11 @@ public enum Cap {
424424
*/
425425
KQL_FUNCTION(Build.current().isSnapshot()),
426426

427+
/**
428+
* Hash function
429+
*/
430+
HASH_FUNCTION(Build.current().isSnapshot()),
431+
427432
/**
428433
* Don't optimize CASE IS NOT NULL function by not requiring the fields to be not null as well.
429434
* https://github.com/elastic/elasticsearch/issues/112704

0 commit comments

Comments
 (0)