Skip to content

Commit d348465

Browse files
Bugfix
1 parent 4fd8734 commit d348465

File tree

1 file changed

+2
-30
lines changed
  • x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/plan/logical/join

1 file changed

+2
-30
lines changed

x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/plan/logical/join/Join.java

Lines changed: 2 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -330,38 +330,10 @@ public void postAnalysisVerification(Failures failures) {
330330
)
331331
);
332332
}
333-
// When joinOnConditions is present, we only verify the matching pairs
334-
int minSize = Math.min(config.leftFields().size(), config.rightFields().size());
335-
for (int i = 0; i < minSize; i++) {
336-
Attribute leftField = config.leftFields().get(i);
337-
Attribute rightField = config.rightFields().get(i);
338-
if (comparableTypes(leftField, rightField) == false) {
339-
failures.add(
340-
fail(
341-
leftField,
342-
"JOIN left field [{}] of type [{}] is incompatible with right field [{}] of type [{}]",
343-
leftField.name(),
344-
leftField.dataType(),
345-
rightField.name(),
346-
rightField.dataType()
347-
)
348-
);
349-
}
350-
// TODO: Add support for VERSION by implementing QueryList.versionTermQueryList similar to ipTermQueryList
351-
if (Arrays.stream(UNSUPPORTED_TYPES).anyMatch(t -> rightField.dataType().equals(t))) {
352-
failures.add(
353-
fail(
354-
leftField,
355-
"JOIN with right field [{}] of type [{}] is not supported",
356-
rightField.name(),
357-
rightField.dataType()
358-
)
359-
);
360-
}
361-
}
362333
return;
363334
}
364-
for (int i = 0; i < config.leftFields().size(); i++) {
335+
int minSize = Math.min(config.leftFields().size(), config.rightFields().size());
336+
for (int i = 0; i < minSize; i++) {
365337
Attribute leftField = config.leftFields().get(i);
366338
Attribute rightField = config.rightFields().get(i);
367339
if (comparableTypes(leftField, rightField) == false) {

0 commit comments

Comments
 (0)