You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by GitBox <gi...@apache.org> on 2021/12/05 07:07:05 UTC

[GitHub] [calcite] JiajunBernoulli commented on a change in pull request #2615: [CALCITE-4897] Fix incomplete implicit type cast

JiajunBernoulli commented on a change in pull request #2615:
URL: https://github.com/apache/calcite/pull/2615#discussion_r762520115



##########
File path: core/src/main/java/org/apache/calcite/sql/validate/implicit/TypeCoercionImpl.java
##########
@@ -121,8 +122,9 @@ public TypeCoercionImpl(RelDataTypeFactory typeFactory, SqlValidator validator)
       // Set operations are binary for now.
       final SqlCall operand0 = ((SqlCall) query).operand(0);
       final SqlCall operand1 = ((SqlCall) query).operand(1);
-      final boolean coerced = rowTypeCoercion(scope, operand0, columnIndex, targetType)
-          && rowTypeCoercion(scope, operand1, columnIndex, targetType);
+      @SuppressWarnings("ShortCircuitBoolean")
+      boolean coerced = rowTypeCoercion(scope, operand0, columnIndex, targetType)
+          | rowTypeCoercion(scope, operand1, columnIndex, targetType);
       // Update the nested SET operator node type.

Review comment:
       I didn't find a more suitable way, just modify the original code.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@calcite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org