Skip to content

Commit 41c9fe6

Browse files
Add a test for Lookup Join with Union Types
1 parent 15b848c commit 41c9fe6

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+
740+
lookupJoinExpressionOnUnionTypes
741+
required_capability: join_lookup_v12
742+
required_capability: lookup_join_on_boolean_expression
743+
required_capability: metadata_fields_remote_test
744+
745+
FROM apps, apps_short METADATA _index
746+
| EVAL language_code = id::integer
747+
| KEEP _index, language_code
748+
| WHERE language_code < 3
749+
| RENAME language_code as language_code_left
750+
| LOOKUP JOIN languages_lookup ON language_code_left == language_code
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+
remote_cluster:apps | 1 | English
757+
remote_cluster:apps | 2 | French
758+
remote_cluster:apps_short | 1 | English
759+
remote_cluster:apps_short | 2 | French
760+
;

0 commit comments

Comments
 (0)