Skip to content

Commit e9d720e

Browse files
[ES|QL] Allow lookup join on mixed numeric fields (elastic#128263) (elastic#128859)
* allow lookup join on mixed numeric fields (cherry picked from commit dfe1357) # Conflicts: # x-pack/plugin/esql/qa/testFixtures/src/main/java/org/elasticsearch/xpack/esql/CsvTestsDataLoader.java # x-pack/plugin/esql/qa/testFixtures/src/main/resources/lookup-join.csv-spec # x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/action/EsqlCapabilities.java
1 parent 8799115 commit e9d720e

File tree

8 files changed

+2908
-12
lines changed

8 files changed

+2908
-12
lines changed

docs/changelog/128263.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 128263
2+
summary: Allow lookup join on mixed numeric fields
3+
area: ES|QL
4+
type: enhancement
5+
issues: []

x-pack/plugin/esql/qa/testFixtures/src/main/java/org/elasticsearch/xpack/esql/CsvTestsDataLoader.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,9 @@ public class CsvTestsDataLoader {
7070
"mapping-languages_nested_fields.json",
7171
"languages_nested_fields.csv"
7272
).withSetting("languages_lookup-settings.json");
73+
private static final TestDataset LANGUAGES_MIX_NUMERICS = new TestDataset("languages_mixed_numerics").withSetting(
74+
"languages_lookup-settings.json"
75+
);
7376
private static final TestDataset ALERTS = new TestDataset("alerts");
7477
private static final TestDataset UL_LOGS = new TestDataset("ul_logs");
7578
private static final TestDataset SAMPLE_DATA = new TestDataset("sample_data");
@@ -128,6 +131,7 @@ public class CsvTestsDataLoader {
128131
Map.entry(LANGUAGES_LOOKUP.indexName, LANGUAGES_LOOKUP),
129132
Map.entry(LANGUAGES_LOOKUP_NON_UNIQUE_KEY.indexName, LANGUAGES_LOOKUP_NON_UNIQUE_KEY),
130133
Map.entry(LANGUAGES_NESTED_FIELDS.indexName, LANGUAGES_NESTED_FIELDS),
134+
Map.entry(LANGUAGES_MIX_NUMERICS.indexName, LANGUAGES_MIX_NUMERICS),
131135
Map.entry(UL_LOGS.indexName, UL_LOGS),
132136
Map.entry(SAMPLE_DATA.indexName, SAMPLE_DATA),
133137
Map.entry(MV_SAMPLE_DATA.indexName, MV_SAMPLE_DATA),
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
language_code_byte:byte,language_code_short:short,language_code_integer:integer,language_code_long:long,language_code_half_float:half_float,language_code_scaled_float:scaled_float,language_code_float:float,language_code_double:double,language_name:keyword
2+
1,1,1,1,1.0,1.0,1.0,1.0,English
3+
2,2,2,2,2.0,2.0,2.0,2.0,French
4+
3,3,3,3,3.0,3.0,3.0,3.0,Spanish
5+
4,4,4,4,4.0,4.0,4.0,4.0,German
6+
-128,-128,-128,-128,-128.0,-128.0,-128.0,-128.0,min_byte
7+
,-129,-129,-129,-129.0,-129.0,-129.0,-129.0,min_byte_minus_1
8+
127,127,127,127,127.0,127.0,127.0,127.0,max_byte
9+
,128,128,128,128.0,128.0,128.0,128.0,max_byte_plus_1
10+
,-32768,-32768,-32768,-32768.0,-32768.0,-32768.0,-32768.0,min_short
11+
,,-32769,-32769,-32769.0,-32769.0,-32769.0,-32769.0,min_short_minus_1
12+
,32767,32767,32767,32767.0,32767.0,32767.0,32767.0,max_short
13+
,,32768,32768,32768.0,32768.0,32768.0,32768.0,max_short_plus_1
14+
,,-2147483648,-2147483648,,-2147483648.0,-2147483648.0,-2147483648.0,min_int
15+
,,,-2147483649,,-2147483649.0,-2147483649.0,-2147483649.0,min_int_minus_1
16+
,,2147483646,2147483646,,2147483646.0,2147483646.0,2147483646.0,max_int_minus_1
17+
,,2147483647,2147483647,,2147483647.0,2147483647.0,2147483647.0,max_int
18+
,,,2147483648,,2147483648.0,2147483648.0,2147483648.0,max_int_plus_1
19+
,,,-9223372036854775808,,-9223372036854775808.0,-9223372036854775808.0,-9223372036854775808.0,min_long
20+
,,,,,-9223372036854775809.0,-9223372036854775809.0,-9223372036854775809.0,min_long_minus_1
21+
,,,9223372036854775806,,9223372036854775806.0,9223372036854775806.0,9223372036854775806.0,max_long_minus_1
22+
,,,9223372036854775807,,9223372036854775807.0,9223372036854775807.0,9223372036854775807.0,max_long
23+
,,,,,9223372036854775808.0,9223372036854775808.0,9223372036854775808.0,max_long_plus_1
24+
,,65504,65504,65504.0,65504.0,65504.0,65504.0,max_half_float
25+
,,65505,65505,65505.0,65505.0,65505.0,65505.0,max_half_float_plus_1
26+
,,-65504,-65504,-65504.0,-65504.0,-65504.0,-65504.0,min_half_float
27+
,,-65505,-65505,-65505.0,-65505.0,-65505.0,-65505.0,min_half_float_minus_1
28+
,,,,,,3.40282346638528860e+38,3.40282346638528860e+38,max_float
29+
,,,,,,-3.40282346638528860e+38,-3.40282346638528860e+38,min_float
30+
,,,,,,,3.40282346638528860e+39,double

0 commit comments

Comments
 (0)