calcite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hequn Cheng (JIRA)" <j...@apache.org>
Subject [jira] [Created] (CALCITE-2198) ClassCastException in RexBuilder when makeLiteral for BINARY and VARBINARY
Date Thu, 01 Mar 2018 12:37:00 GMT
Hequn Cheng created CALCITE-2198:
------------------------------------

             Summary: ClassCastException in RexBuilder when makeLiteral for BINARY and VARBINARY
                 Key: CALCITE-2198
                 URL: https://issues.apache.org/jira/browse/CALCITE-2198
             Project: Calcite
          Issue Type: Bug
          Components: core
            Reporter: Hequn Cheng
            Assignee: Julian Hyde


Currently, makeLiteral for {{BINARY}} and {{VARBINARY}} will throw {{ClassCastException}} when
value type is {{byte[]}}:
{code:java}
java.lang.ClassCastException: [B cannot be cast to org.apache.calcite.avatica.util.ByteString
 at org.apache.calcite.rex.RexBuilder.makeLiteral(RexBuilder.java:1271)
 at org.apache.calcite.rex.RexBuilder.makeLiteral(RexBuilder.java:1251){code}
To avoid this exception we have to add support for type of  {{byte[]}}. One choice is to
convert {{byte[]}} to {{ByteString}} in {{RexBuilder.clean()}}.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message