Skip to content

Commit 8a10ffa

Browse files
ESQL: Add CSV Test for Lookup Join on Expression with Union Types (#135290)
Add test for Lookup Join on Expression and Union Types
1 parent a2157c0 commit 8a10ffa

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

x-pack/plugin/esql/qa/testFixtures/src/main/resources/lookup-join-expression.csv-spec

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -735,3 +735,26 @@ id_int:integer | name_str:keyword | extra1:keyword | other1:keyword | other2:int
735735
13 | Mia | thud | xi | 14000
736736
14 | Nina | foo2 | omicron | 15000
737737
;
738+
739+
lookupJoinExpressionOnUnionTypes
740+
required_capability: join_lookup_v12
741+
required_capability: lookup_join_on_boolean_expression
742+
required_capability: metadata_fields_remote_test
743+
744+
FROM apps, apps_short METADATA _index
745+
| EVAL language_code = id::integer
746+
| KEEP _index, language_code
747+
| WHERE language_code < 3
748+
| RENAME language_code as language_code_left
749+
| LOOKUP JOIN languages_lookup ON language_code_left == language_code
750+
| EVAL _index = CASE(STARTS_WITH(_index, "remote_cluster:"), SUBSTRING(_index, 16), _index)
751+
| KEEP _index, language_code, language_name
752+
| SORT _index ASC, language_code ASC
753+
;
754+
755+
_index:keyword | language_code:integer | language_name:keyword
756+
apps | 1 | English
757+
apps | 2 | French
758+
apps_short | 1 | English
759+
apps_short | 2 | French
760+
;

0 commit comments

Comments
 (0)