From 0f7c111675c8ded074b3b48856ac5252849ae945 Mon Sep 17 00:00:00 2001 From: Mark Tozzi Date: Wed, 31 Jan 2024 09:13:14 -0500 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Andrei Stefan --- .../operator/arithmetic/EsqlArithmeticOperation.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/EsqlArithmeticOperation.java b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/EsqlArithmeticOperation.java index 0dd3ea2a80278..546b0f801bfb4 100644 --- a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/EsqlArithmeticOperation.java +++ b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/EsqlArithmeticOperation.java @@ -131,8 +131,8 @@ protected TypeResolution checkCompatibility() { // This checks that unsigned longs should only be compatible with other unsigned longs DataType leftType = left().dataType(); DataType rightType = right().dataType(); - if ((rightType == DataTypes.UNSIGNED_LONG && (false == (leftType == UNSIGNED_LONG || leftType == DataTypes.NULL))) - || (leftType == DataTypes.UNSIGNED_LONG && (false == (rightType == UNSIGNED_LONG || rightType == DataTypes.NULL)))) { + if ((rightType == UNSIGNED_LONG && (false == (leftType == UNSIGNED_LONG || leftType == DataTypes.NULL))) + || (leftType == UNSIGNED_LONG && (false == (rightType == UNSIGNED_LONG || rightType == DataTypes.NULL)))) { return new TypeResolution(formatIncombatibleTypesMessage(symbol(), leftType.typeName(), rightType.typeName())); } // If the LHS is numeric, the RHS should be numeric or null