lowka commented on code in PR #1513:
URL: https://github.com/apache/ignite-3/pull/1513#discussion_r1069609710
##########
modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/prepare/IgniteTypeCoercion.java:
##########
@@ -47,6 +49,57 @@ public IgniteTypeCoercion(RelDataTypeFactory typeFactory,
SqlValidator validator
super(typeFactory, validator);
}
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean binaryComparisonCoercion(SqlCallBinding binding) {
+ // Although it is not reflected in the docs, this method is also
invoked for MAX, MIN (and other similar operators)
+ // by ComparableOperandTypeChecker. When that is the case, fallback to
default rules.
+ SqlCall call = binding.getCall();
+ if (binding.getOperandCount() != 2 &&
!SqlKind.BINARY_COMPARISON.contains(call.getKind())) {
Review Comment:
Discussed in slack. There was a problem since we should use OR instead of
AND here.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]