Skip to content

Commit 023deb8

Browse files
refactor
1 parent 5a20693 commit 023deb8

File tree

1 file changed

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

1 file changed

+5
-4
lines changed

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

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -284,11 +284,12 @@ public void postAnalysisVerification(Failures failures) {
284284
}
285285

286286
private static boolean comparableTypes(Attribute left, Attribute right) {
287-
if (left.dataType().isNumeric() && right.dataType().isNumeric()) {
287+
DataType leftType = left.dataType();
288+
DataType rightType = right.dataType();
289+
if (leftType.isNumeric() && rightType.isNumeric()) {
288290
// Allow byte, short, integer, long, half_float, scaled_float, float and double to join against each other
289-
return commonType(left.dataType(), right.dataType()) != null;
290-
} else {
291-
return left.dataType().noText() == right.dataType().noText();
291+
return commonType(leftType, rightType) != null;
292292
}
293+
return leftType.noText() == rightType.noText();
293294
}
294295
}

0 commit comments

Comments
 (0)