File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed
qa/testFixtures/src/main/resources
src/main/java/org/elasticsearch/xpack/esql/action Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -1596,6 +1596,7 @@ emp_no:integer | languages:integer | first_name:keyword
1596
1596
;
1597
1597
1598
1598
space
1599
+ required_capability: space
1599
1600
// tag::space[]
1600
1601
ROW message = CONCAT("Hello", SPACE(1), "World!");
1601
1602
// end::space[]
@@ -1607,13 +1608,15 @@ Hello World!
1607
1608
;
1608
1609
1609
1610
spaceLength
1611
+ required_capability: space
1610
1612
ROW len = LENGTH(SPACE(12));
1611
1613
1612
1614
len:integer
1613
1615
12
1614
1616
;
1615
1617
1616
1618
spaceCalculated
1619
+ required_capability: space
1617
1620
ROW inner_width = 20, title = "Title"
1618
1621
| EVAL lspace = SPACE((inner_width-LENGTH(title))/2),
1619
1622
rspace = SPACE(inner_width-LENGTH(lspace)-LENGTH(title)),
@@ -1625,20 +1628,23 @@ inner_width:integer | centered_title:keyword
1625
1628
;
1626
1629
1627
1630
spaceZero
1631
+ required_capability: space
1628
1632
ROW s = SPACE(0);
1629
1633
1630
1634
s:keyword
1631
1635
""
1632
1636
;
1633
1637
1634
1638
spaceNull
1639
+ required_capability: space
1635
1640
ROW s = SPACE(null);
1636
1641
1637
1642
s:keyword
1638
1643
null
1639
1644
;
1640
1645
1641
1646
spaceNegative
1647
+ required_capability: space
1642
1648
FROM employees | SORT emp_no | LIMIT 1 | EVAL s = SPACE(-LENGTH(first_name)) | KEEP s;
1643
1649
1644
1650
warning:Line 1:51: evaluation of [SPACE(-LENGTH(first_name))] failed, treating result as null. Only first 20 failures recorded.
Original file line number Diff line number Diff line change @@ -269,7 +269,12 @@ public enum Cap {
269
269
/**
270
270
* Allow mixed numeric types in coalesce
271
271
*/
272
- MIXED_NUMERIC_TYPES_IN_COALESCE ;
272
+ MIXED_NUMERIC_TYPES_IN_COALESCE ,
273
+
274
+ /**
275
+ * Support for requesting the "SPACE" function.
276
+ */
277
+ SPACE ;
273
278
274
279
private final boolean snapshotOnly ;
275
280
private final FeatureFlag featureFlag ;
You can’t perform that action at this time.
0 commit comments