Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
1.36.0
Description
This test in SqlOperatorTest:
SqlOperatorFixture f = fixture(); f.checkScalar("CAST('00' AS VARBINARY)", "00", "VARBINARY NOT NULL");
Causes the following assertion failure:
java.lang.AssertionError: value 00 does not match type class org.apache.calcite.avatica.util.ByteString at org.apache.calcite.linq4j.tree.ConstantExpression.<init>(ConstantExpression.java:51) at org.apache.calcite.linq4j.tree.Expressions.constant(Expressions.java:585) at org.apache.calcite.linq4j.tree.OptimizeShuttle.visit(OptimizeShuttle.java:305) at org.apache.calcite.linq4j.tree.UnaryExpression.accept(UnaryExpression.java:39) at org.apache.calcite.linq4j.tree.TernaryExpression.accept(TernaryExpression.java:47) at org.apache.calcite.linq4j.tree.DeclarationStatement.accept(DeclarationStatement.java:45) at org.apache.calcite.linq4j.tree.DeclarationStatement.accept(DeclarationStatement.java:27) at org.apache.calcite.linq4j.tree.BlockBuilder.optimize(BlockBuilder.java:426) at org.apache.calcite.linq4j.tree.BlockBuilder.toBlock(BlockBuilder.java:340) at org.apache.calcite.rex.RexExecutorImpl.compile(RexExecutorImpl.java:102) at org.apache.calcite.rex.RexExecutorImpl.compile(RexExecutorImpl.java:68) at org.apache.calcite.rex.RexExecutorImpl.reduce(RexExecutorImpl.java:133) at org.apache.calcite.rex.RexSimplify.simplifyCast(RexSimplify.java:2272) at org.apache.calcite.rex.RexSimplify.simplify(RexSimplify.java:292) at org.apache.calcite.rex.RexSimplify.simplifyUnknownAs(RexSimplify.java:250) at org.apache.calcite.rex.RexSimplify.simplifyPreservingType(RexSimplify.java:189) at org.apache.calcite.rex.RexSimplify.simplifyPreservingType(RexSimplify.java:184)
Attachments
Issue Links
- relates to
-
CALCITE-6270 Support FORMAT in CAST from Numeric and BYTES to String (Enabled in BigQuery)
- Open
- links to