Skip to content

Commit 84d5f5e

Browse files
committed
change capability name to keep consistent
1 parent f8c2774 commit 84d5f5e

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1838,7 +1838,7 @@ y:date | c:long
18381838
;
18391839

18401840
dayNameRowTest
1841-
required_capability: day_name_function
1841+
required_capability:fn_day_name
18421842
// tag::docsDayName[]
18431843
ROW dt = to_datetime("1953-09-02T00:00:00.000Z")
18441844
| EVAL weekday = DAY_NAME(dt);
@@ -1849,7 +1849,7 @@ dt:date | weekday:keyword
18491849
;
18501850

18511851
dayNameSimple
1852-
required_capability: day_name_function
1852+
required_capability:fn_day_name
18531853
from employees
18541854
| sort emp_no
18551855
| keep emp_no, hire_date
@@ -1861,7 +1861,7 @@ emp_no:integer | hire_date:date | day:keyword
18611861
;
18621862

18631863
dayNameTruncate
1864-
required_capability: day_name_function
1864+
required_capability:fn_day_name
18651865
FROM employees
18661866
| EVAL a = hire_date
18671867
| RENAME hire_date as b
@@ -1882,7 +1882,7 @@ y:date | c:long | week_day:keyword
18821882
;
18831883

18841884
dayNameNestedCall
1885-
required_capability: day_name_function
1885+
required_capability:fn_day_name
18861886
from employees
18871887
| sort emp_no
18881888
| eval first_day_of_month = day_name(date_trunc(1 month, hire_date))
@@ -1903,7 +1903,7 @@ emp_no:integer | hire_date:datetime | first_day_of_month:keyword
19031903
;
19041904

19051905
dayNameNestedCall
1906-
required_capability: day_name_function
1906+
required_capability:fn_day_name
19071907
from employees
19081908
| sort emp_no desc
19091909
| eval first_day_of_month = to_upper(day_name(date_trunc(1 month, hire_date)))
@@ -1924,7 +1924,7 @@ emp_no:integer | hire_date:datetime | first_day_of_month:keyword
19241924
;
19251925

19261926
dayNameNull
1927-
required_capability: day_name_function
1927+
required_capability:fn_day_name
19281928
from employees | where emp_no == 10040 | eval x = day_name(birth_date) | keep emp_no, birth_date, hire_date, x;
19291929

19301930
emp_no:integer | birth_date:date | hire_date:date | x:keyword

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,11 @@ public enum Cap {
235235
*/
236236
FN_SCALB,
237237

238+
/**
239+
* Support for function DAY_NAME
240+
*/
241+
FN_DAY_NAME,
242+
238243
/**
239244
* Fixes for multiple functions not serializing their source, and emitting warnings with wrong line number and text.
240245
*/
@@ -1335,12 +1340,7 @@ public enum Cap {
13351340
/**
13361341
* Support correct counting of skipped shards.
13371342
*/
1338-
CORRECT_SKIPPED_SHARDS_COUNT,
1339-
1340-
/**
1341-
* Supports DAY_NAME function
1342-
*/
1343-
DAY_NAME_FUNCTION;
1343+
CORRECT_SKIPPED_SHARDS_COUNT;
13441344

13451345
private final boolean enabled;
13461346

0 commit comments

Comments
 (0)