Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Not A Problem
-
None
-
None
-
None
Description
Hive supports CAST('1' as BINARY). Result is 0x31 (can be tested with
SELECT HEX(CAST('1' as BINARY));
. If I'm not mistaken, the CAST result is the UTF-8 encoding of the input string.
CALCITE 1.11 throws AssertionException during compilation for such an expression:
Thread [db11b6e6-8fa7-48b3-82ef-c5b4550327ec main] (Suspended (exception AssertionError)) ConstantExpression.<init>(Type, Object) line: 50 Expressions.constant(Object, Type) line: 586 OptimizeShuttle.visit(UnaryExpression, Expression) line: 279 UnaryExpression.accept(Shuttle) line: 37 Expressions.acceptExpressions(List<Expression>, Shuttle) line: 3184 MethodCallExpression.accept(Shuttle) line: 60 TernaryExpression.accept(Shuttle) line: 45
Attachments
Issue Links
- Blocked
-
HIVE-15708 Upgrade calcite version to 1.12
- Closed
- depends upon
-
CALCITE-1439 Handle errors during constant reduction
- Closed
- is related to
-
CALCITE-1417 In RelBuilder, simplify "CAST(literal TO type)" to a literal when possible
- Closed
-
CALCITE-1653 Pass an expression executor to RexUtil.simplify for constant reduction
- Closed
- links to