Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
avatica-1.17.0
Description
Cases to reproduce: any query with array containing both int and bigdecimal elements for instance
select array[1, 1.1]; select array[1.1, 1];
which leads to ClassCastException
class java.lang.Integer cannot be cast to class java.math.BigDecimal (java.lang.Integer and java.math.BigDecimal are in module java.base of loader 'bootstrap') java.lang.ClassCastException: class java.lang.Integer cannot be cast to class java.math.BigDecimal (java.lang.Integer and java.math.BigDecimal are in module java.base of loader 'bootstrap') at org.apache.calcite.avatica.util.AbstractCursor$BigDecimalAccessor.getBigDecimal(AbstractCursor.java:701) at org.apache.calcite.avatica.util.AbstractCursor$ArrayAccessor.convertValue(AbstractCursor.java:1338) at org.apache.calcite.avatica.util.AbstractCursor$ArrayAccessor.getObject(AbstractCursor.java:1299) at org.apache.calcite.avatica.util.AbstractCursor$ArrayAccessor.getArray(AbstractCursor.java:1352) at org.apache.calcite.avatica.util.AbstractCursor$ArrayAccessor.getString(AbstractCursor.java:1364) at org.apache.calcite.avatica.AvaticaResultSet.getString(AvaticaResultSet.java:239)
Attachments
Issue Links
- is related to
-
CALCITE-4850 Wrong result retrieving from ARRAY with mixed INTEGER and DECIMAL elements
- Closed
- relates to
-
CALCITE-4600 ClassCastException retrieving from an ARRAY that has DATE, TIME or TIMESTAMP elements
- Closed
-
CALCITE-4762 Upgrade Calcite to Avatica 1.19
- Closed
- links to