Skip to content
Merged
Show file tree
Hide file tree
Changes from 45 commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
55556b7
Restrict EnrichPolicyResolver to supported types
alex-spies Oct 31, 2025
3b2aa0d
Update docs/changelog/137431.yaml
alex-spies Oct 31, 2025
3ca4ed9
Plumb minimum version into ENRICH resolution
alex-spies Oct 31, 2025
117bccf
[CI] Update transport version definitions
Oct 31, 2025
c9fc534
Merge remote-tracking branch 'upstream/main' into fix-enrich-lj-resol…
alex-spies Oct 31, 2025
6387ac6
[CI] Update transport version definitions
Oct 31, 2025
04329c5
Plumb minimumVersion into the profile
alex-spies Nov 4, 2025
6a30c94
Update tests
alex-spies Nov 4, 2025
0ab7c07
Assert minimum version in AllSupportedFields tests
alex-spies Nov 4, 2025
fff61c3
Fix tests some more
alex-spies Nov 4, 2025
c923ad3
Fix test
alex-spies Nov 4, 2025
a2c5123
Merge remote-tracking branch 'upstream/main' into fix-enrich-lj-resol…
alex-spies Nov 4, 2025
e7c628b
Fix test expectations
alex-spies Nov 4, 2025
ea39c52
[CI] Update transport version definitions
Nov 4, 2025
11de8ec
Add test for ROW
alex-spies Nov 5, 2025
27d56f8
Remove obsolete expectations
alex-spies Nov 5, 2025
22b7aa5
WIP: LOOKUP JOIN tests
alex-spies Nov 5, 2025
6cf55ee
Consider min version from LOOKUP JOIN resolution
alex-spies Nov 5, 2025
f7939c0
Fix serialization exception
alex-spies Nov 6, 2025
bb1d7a1
Finish test for cluster-local LOOKUP JOIN
alex-spies Nov 6, 2025
c78dbd9
Rename minimumVersion->minimumTransportVersion in profile
alex-spies Nov 6, 2025
73b05d9
Add test with ROW | ENRICH
alex-spies Nov 6, 2025
3afd809
Fix + test ROW | ENRICH
alex-spies Nov 6, 2025
d08f481
Delete docs/changelog/137431.yaml
alex-spies Nov 6, 2025
7402ff0
Update docs/changelog/137431.yaml
alex-spies Nov 6, 2025
482404e
Delete docs/changelog/137431.yaml
alex-spies Nov 6, 2025
855fd38
Update docs/changelog/137431.yaml
alex-spies Nov 6, 2025
2b84f68
Fix bug
alex-spies Nov 6, 2025
cd8cb65
Add comment
alex-spies Nov 6, 2025
022c9c2
Merge remote-tracking branch 'upstream/main' into fix-enrich-lj-resol…
alex-spies Nov 6, 2025
15b607b
[CI] Update transport version definitions
Nov 6, 2025
8db7bd9
Remove leftovers
alex-spies Nov 6, 2025
edf69b3
Clarify comment
alex-spies Nov 6, 2025
1a3ddc8
Improve log message
alex-spies Nov 7, 2025
1a8cbe4
Rename resolveAsMergedMapping->resolveIndexPattern
alex-spies Nov 7, 2025
ced04e1
Obtain local cluster version from ClusterState
alex-spies Nov 27, 2025
c68bc07
Update comment
alex-spies Nov 27, 2025
31f8a1a
Fix comment
alex-spies Nov 27, 2025
b3b1fe6
Fix some more comments
alex-spies Nov 27, 2025
5b41cce
Merge remote-tracking branch 'upstream/main' into fix-enrich-lj-resol…
alex-spies Nov 28, 2025
8a6fb3c
Minor simplification
alex-spies Nov 28, 2025
853d867
Fix tests
alex-spies Nov 28, 2025
8e4852b
Fix comment
alex-spies Nov 28, 2025
8d62430
[CI] Update transport version definitions
Nov 28, 2025
e48a1fa
Simplify leftovers
alex-spies Nov 28, 2025
3dd0261
Fix checkstyle violations
alex-spies Nov 28, 2025
ae90dd8
Handle null values in profile's minimum version
alex-spies Nov 28, 2025
aa2fb92
Fix another test
alex-spies Nov 28, 2025
7e2bf04
Add test for FROM *:* (only remote indices)
alex-spies Nov 28, 2025
aa0693c
Add test for FROM | ENRICH
alex-spies Nov 28, 2025
4dfbb65
Add test for FROM | LOOKUP JOIN
alex-spies Nov 28, 2025
59e0ef7
Force lookup joins onto remotes for good measure
alex-spies Nov 28, 2025
87f4fa0
Make assertion stricter in test
alex-spies Nov 28, 2025
2c5e937
Merge branch 'main' into fix-enrich-lj-resolution-min-transport-version
craigtaverner Dec 1, 2025
14b2e4d
Merge branch 'main' into fix-enrich-lj-resolution-min-transport-version
alex-spies Dec 2, 2025
08eae94
Merge remote-tracking branch 'upstream/main' into fix-enrich-lj-resol…
alex-spies Dec 2, 2025
f3559db
[CI] Update transport version definitions
Dec 2, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions docs/changelog/137431.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
pr: 137431
summary: Fix enrich and lookup join resolution based on min transport version
area: ES|QL
type: bug
issues: []
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
9230000,9185011
2 changes: 1 addition & 1 deletion server/src/main/resources/transport/upper_bounds/9.2.csv
Original file line number Diff line number Diff line change
@@ -1 +1 @@
aggregate_metric_double_typed_block,9185010
esql_use_minimum_version_for_enrich_resolution,9185011
2 changes: 1 addition & 1 deletion server/src/main/resources/transport/upper_bounds/9.3.csv
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ingest_request_dynamic_template_params,9229000
esql_use_minimum_version_for_enrich_resolution,9230000
Original file line number Diff line number Diff line change
Expand Up @@ -2764,7 +2764,8 @@ protected static MapMatcher getProfileMatcher() {
.entry("query", instanceOf(Map.class))
.entry("planning", instanceOf(Map.class))
.entry("drivers", instanceOf(List.class))
.entry("plans", instanceOf(List.class));
.entry("plans", instanceOf(List.class))
.entry("minimumTransportVersion", instanceOf(Integer.class));
}

protected static MapMatcher getResultMatcher(boolean includePartial, boolean includeDocumentsFound, boolean includeTimestamps) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import org.elasticsearch.index.IndexMode;
import org.elasticsearch.index.mapper.SourceFieldMapper;
import org.elasticsearch.index.mapper.TimeSeriesIdFieldMapper;
import org.elasticsearch.xpack.esql.core.QlIllegalArgumentException;
import org.elasticsearch.xpack.esql.core.util.PlanStreamInput;
import org.elasticsearch.xpack.esql.core.util.PlanStreamOutput;

Expand Down Expand Up @@ -759,13 +760,9 @@ public DataType counter() {
public void writeTo(StreamOutput out) throws IOException {
if (supportedVersion.supportedOn(out.getTransportVersion(), Build.current().isSnapshot()) == false) {
/*
* TODO when we implement version aware planning flip this to an IllegalStateException
* so we throw a 500 error. It'll be our bug then. Right now it's a sign that the user
* tried to do something like `KNN(dense_vector_field, [1, 2])` against an old node.
* Like, during the rolling upgrade that enables KNN or to a remote cluster that has
* not yet been upgraded.
* Throw a 500 error - this is a bug, we failed to account for an old node during planning.
*/
throw new IllegalArgumentException(
throw new QlIllegalArgumentException(
"remote node at version [" + out.getTransportVersion() + "] doesn't understand data type [" + this + "]"
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@ public AllSupportedFieldsIT(MappedFieldType.FieldExtractPreference extractPrefer
public void createRemoteIndices() throws IOException {
if (supportsNodeAssignment()) {
for (Map.Entry<String, NodeInfo> e : remoteNodeToInfo().entrySet()) {
createIndexForNode(remoteClient(), e.getKey(), e.getValue().id());
createIndexForNode(remoteClient(), e.getKey(), e.getValue().id(), indexMode());
}
} else {
createIndexForNode(remoteClient(), null, null);
createIndexForNode(remoteClient(), null, null, indexMode());
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,7 @@ private void testPushQuery(
.entry("plans", instanceOf(List.class))
.entry("planning", matchesMap().extraOk())
.entry("query", matchesMap().extraOk())
.entry("minimumTransportVersion", instanceOf(Integer.class))
),
matchesList().item(matchesMap().entry("name", "test").entry("type", anyOf(equalTo("text"), equalTo("keyword")))),
equalTo(found ? List.of(List.of(value)) : List.of())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ private void testQuery(Double percent, String query, int documentsFound, boolean
.entry("plans", instanceOf(List.class))
.entry("planning", matchesMap().extraOk())
.entry("query", matchesMap().extraOk())
.entry("minimumTransportVersion", instanceOf(Integer.class))
)
.extraOk()
);
Expand Down
Loading