Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
1.35.0
Description
The following SqlOperatorTest causes an AssertionFailure:
f.check("SELECT x'31' + 0", "INTEGER NOT NULL", "50");
The top of the stack trace is:
at org.apache.calcite.sql.validate.implicit.AbstractTypeCoercion.needToCast(AbstractTypeCoercion.java:297) at org.apache.calcite.sql.validate.implicit.AbstractTypeCoercion.coerceOperandType(AbstractTypeCoercion.java:117) at org.apache.calcite.sql.validate.implicit.TypeCoercionImpl.binaryArithmeticWithStrings(TypeCoercionImpl.java:200) at org.apache.calcite.sql.validate.implicit.TypeCoercionImpl.binaryArithmeticCoercion(TypeCoercionImpl.java:172) at org.apache.calcite.sql.type.CompositeOperandTypeChecker.checkOperandTypes(CompositeOperandTypeChecker.java:261) at org.apache.calcite.sql.SqlOperator.checkOperandTypes(SqlOperator.java:761) at org.apache.calcite.sql.SqlOperator.validateOperands(SqlOperator.java:498) at org.apache.calcite.sql.SqlOperator.deriveType(SqlOperator.java:607) at org.apache.calcite.sql.SqlBinaryOperator.deriveType(SqlBinaryOperator.java:178)
Attachments
Issue Links
- links to