Skip to content

Commit 995724d

Browse files
committed
Add csv-spec tests for COALESCE
1 parent e44c824 commit 995724d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,8 @@ ROW location = TO_GEOPOINT("POINT(12.6493508684508 55.6285017221528)")
134134
| EVAL description = MV_CONCAT(chain::keyword, " --> ")
135135
| EVAL top = MV_LAST(chain)
136136
| EVAL bottom = MV_FIRST(chain)
137+
| EVAL top = COALESCE(top, null, bottom)
138+
| EVAL bottom = COALESCE(bottom, null, top)
137139
| WHERE MV_CONTAINS(chain, top) AND MV_CONTAINS(chain, bottom)
138140
| KEEP location, top, bottom, chain, description
139141
;
@@ -533,6 +535,8 @@ ROW location = TO_GEOPOINT("POINT(12.6493508684508 55.6285017221528)")
533535
| EVAL description = MV_CONCAT(chain::keyword, " --> ")
534536
| EVAL top = MV_LAST(chain)
535537
| EVAL bottom = MV_FIRST(chain)
538+
| EVAL top = COALESCE(top, null, bottom)
539+
| EVAL bottom = COALESCE(bottom, null, top)
536540
| WHERE MV_CONTAINS(chain, top) AND MV_CONTAINS(chain, bottom)
537541
| KEEP location, top, bottom, chain, description
538542
;
@@ -891,6 +895,8 @@ ROW location = TO_GEOPOINT("POINT(12.6493508684508 55.6285017221528)")
891895
| EVAL description = MV_CONCAT(chain::keyword, " --> ")
892896
| EVAL top = MV_LAST(chain)
893897
| EVAL bottom = MV_FIRST(chain)
898+
| EVAL top = COALESCE(top, null, bottom)
899+
| EVAL bottom = COALESCE(bottom, null, top)
894900
| WHERE MV_CONTAINS(chain, top) AND MV_CONTAINS(chain, bottom)
895901
| KEEP location, top, bottom, chain, description
896902
;

0 commit comments

Comments
 (0)