Commit a4e72ad
committed
ESQL: Fix enrich and lookup join resolution based on min transport version (elastic#137431)
When deciding which types are supported, we did not use the correct minimum transport version during the enrich resolution in case of CCS and ROW queries. What's more, the EnrichPolicyResolver did not account for the fact that the node requesting resolution might be on a version that doesn't support the types in the resolved mapping, which led to serialization bugs surfacing when trying to enable the DATE_RANGE type.
- Initialize the minimum transport version with the minimum version from the cluster state before any resolution steps. That makes ROW queries correct.
- Send the determined minimum transport version along the enrich resolution request so that remote clusters don't send un-deserializable data types back.
- Add the determined minimum transport version to the profile.
- Add a bunch of tests.
(cherry picked from commit 4a14f83)
# Conflicts:
# server/src/main/resources/transport/upper_bounds/9.3.csv
# x-pack/plugin/esql/qa/server/single-node/src/javaRestTest/java/org/elasticsearch/xpack/esql/qa/single_node/PushExpressionToLoadIT.java
# x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/enrich/EnrichPolicyResolver.java
# x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/plugin/TransportEsqlQueryAction.java
# x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/session/EsqlSession.java
# x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/session/IndexResolver.java1 parent 8fa2c74 commit a4e72ad
File tree
26 files changed
+785
-213
lines changed- docs/changelog
- server/src/main/resources/transport
- definitions/referable
- upper_bounds
- test/framework/src/main/java/org/elasticsearch/test/rest
- x-pack/plugin
- esql-core/src/main/java/org/elasticsearch/xpack/esql/core/type
- esql
- qa/server
- multi-clusters/src/javaRestTest/java/org/elasticsearch/xpack/esql/ccq
- single-node/src/javaRestTest/java/org/elasticsearch/xpack/esql/qa/single_node
- src/main/java/org/elasticsearch/xpack/esql/qa/rest
- src
- main/java/org/elasticsearch/xpack/esql
- action
- enrich
- execution
- plugin
- querylog
- session
- test/java/org/elasticsearch/xpack/esql
- action
- enrich
- querylog
- telemetry
26 files changed
+785
-213
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2733 | 2733 | | |
2734 | 2734 | | |
2735 | 2735 | | |
2736 | | - | |
| 2736 | + | |
| 2737 | + | |
2737 | 2738 | | |
2738 | 2739 | | |
2739 | 2740 | | |
| |||
Lines changed: 3 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| |||
751 | 752 | | |
752 | 753 | | |
753 | 754 | | |
754 | | - | |
755 | | - | |
756 | | - | |
757 | | - | |
758 | | - | |
| 755 | + | |
759 | 756 | | |
760 | | - | |
| 757 | + | |
761 | 758 | | |
762 | 759 | | |
763 | 760 | | |
| |||
Lines changed: 22 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
| 53 | + | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
57 | 65 | | |
58 | 66 | | |
59 | 67 | | |
| |||
101 | 109 | | |
102 | 110 | | |
103 | 111 | | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
104 | 124 | | |
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
365 | 365 | | |
366 | 366 | | |
367 | 367 | | |
| 368 | + | |
368 | 369 | | |
369 | 370 | | |
370 | 371 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
| 125 | + | |
125 | 126 | | |
126 | 127 | | |
127 | 128 | | |
| |||
0 commit comments