calcite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan Van Besien <ja...@ngdata.com>
Subject explicit cast required where not expected
Date Thu, 24 Sep 2015 12:16:27 GMT
I am in the process of upgrading a JDBC driver implementation with
calcite from 0.9.2 to 1.4.0. On a table with an ID field that is
defined as java.sql.Types.BIGINT, I used to be able to write queries
like these in calcite 0.9.2 (at least).

select id * 3 from table

Now (1.4.0) I have to write

select id * cast(3 as bigint) from table

If not, I get a ClassCastException

java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.Integer
at org.apache.calcite.avatica.util.AbstractCursor$IntAccessor.getInt(AbstractCursor.java:485)
at org.apache.calcite.avatica.AvaticaSite.get(AvaticaSite.java:338)
at org.apache.calcite.avatica.AvaticaResultSet.getObject(AvaticaResultSet.java:381)
...

Is there a good reason for this change or is it a bug?

Thanks
Jan

Mime
View raw message