From 50813812dd85c7adce483b0fdf2a15d99b6604ae Mon Sep 17 00:00:00 2001 From: "ievgen.degtiarenko" Date: Thu, 19 Dec 2024 11:29:00 +0100 Subject: [PATCH] add more samples --- .../resources/languages_nested_fields.csv | 2 +- .../src/main/resources/lookup-join.csv-spec | 28 ++++++++++++++++++- .../mapping-languages_nested_fields.json | 7 ++++- 3 files changed, 34 insertions(+), 3 deletions(-) diff --git a/x-pack/plugin/esql/qa/testFixtures/src/main/resources/languages_nested_fields.csv b/x-pack/plugin/esql/qa/testFixtures/src/main/resources/languages_nested_fields.csv index f26114245a6d3..154125cf49304 100644 --- a/x-pack/plugin/esql/qa/testFixtures/src/main/resources/languages_nested_fields.csv +++ b/x-pack/plugin/esql/qa/testFixtures/src/main/resources/languages_nested_fields.csv @@ -1,4 +1,4 @@ -_id:integer,language.id:integer,language.name:keyword,language.code:keyword +_id:integer,language.id:integer,language.name:text,language.code:keyword 1,1,English,EN 2,2,French,FR 3,3,Spanish,ES diff --git a/x-pack/plugin/esql/qa/testFixtures/src/main/resources/lookup-join.csv-spec b/x-pack/plugin/esql/qa/testFixtures/src/main/resources/lookup-join.csv-spec index 0c20c70ee589b..618149f2c3dde 100644 --- a/x-pack/plugin/esql/qa/testFixtures/src/main/resources/lookup-join.csv-spec +++ b/x-pack/plugin/esql/qa/testFixtures/src/main/resources/lookup-join.csv-spec @@ -431,7 +431,7 @@ FROM employees | KEEP emp_no, language.id, language.name ; -emp_no:integer | language.id:integer | language.name:keyword +emp_no:integer | language.id:integer | language.name:text 10001 | 1 | English 10002 | 2 | French 10003 | 3 | Spanish @@ -439,6 +439,32 @@ emp_no:integer | language.id:integer | language.name:keyword 10005 | 5 | null ; + +joinOnNestedFieldRow +required_capability: join_lookup_v8 + +ROW language.code = "EN" +| LOOKUP JOIN languages_nested_fields ON language.code +| KEEP language.id, language.code, language.name.keyword +; + +language.id:integer | language.code:keyword | language.name.keyword:keyword +1 | EN | English +; + + +joinOnNestedNestedFieldRow +required_capability: join_lookup_v8 + +ROW language.name.keyword = "English" +| LOOKUP JOIN languages_nested_fields ON language.name.keyword +| KEEP language.id, language.name, language.name.keyword +; + +language.id:integer | language.name:text | language.name.keyword:keyword +1 | English | English +; + ############################################### # Tests with clientips_lookup index ############################################### diff --git a/x-pack/plugin/esql/qa/testFixtures/src/main/resources/mapping-languages_nested_fields.json b/x-pack/plugin/esql/qa/testFixtures/src/main/resources/mapping-languages_nested_fields.json index 8655aa80245ca..9b46a85ed8d11 100644 --- a/x-pack/plugin/esql/qa/testFixtures/src/main/resources/mapping-languages_nested_fields.json +++ b/x-pack/plugin/esql/qa/testFixtures/src/main/resources/mapping-languages_nested_fields.json @@ -6,7 +6,12 @@ "type": "integer" }, "name": { - "type": "keyword" + "type": "text", + "fields": { + "keyword": { + "type": "keyword" + } + } }, "code": { "type": "keyword"