[ https://issues.apache.org/jira/browse/HIVE-25459?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17405174#comment-17405174 ]
László Bodor edited comment on HIVE-25459 at 8/26/21, 11:49 AM: ---------------------------------------------------------------- same for decimals too: {code} -- *** DECIMAL *** CREATE TABLE parquet_map_type_decimal ( id int, decimalMap map<decimal(1,0), decimal(1,0)> ) stored as parquet; insert into parquet_map_type_decimal SELECT 1, MAP(1.0, NULL, 2.0, 3.0); insert into parquet_map_type_decimal (id) VALUES (2); select id, decimalMap from parquet_map_type_decimal; select id, decimalMap[1] from parquet_map_type_decimal group by id, decimalMap[1]; -- fails until HIVE-25459 is solved {code} {code} Caused by: java.lang.ClassCastException: org.apache.hadoop.hive.ql.exec.vector.DecimalColumnVector cannot be cast to org.apache.hadoop.hive.ql.exec.vector.LongColumnVector at org.apache.hadoop.hive.ql.exec.vector.expressions.VectorUDFMapIndexLongScalar.findScalarInMap(VectorUDFMapIndexLongScalar.java:67) at org.apache.hadoop.hive.ql.exec.vector.expressions.VectorUDFMapIndexBaseScalar.evaluate(VectorUDFMapIndexBaseScalar.java:74) at org.apache.hadoop.hive.ql.exec.vector.VectorSelectOperator.process(VectorSelectOperator.java:146) {code} was (Author: abstractdog): same for decimals too: {code} Caused by: java.lang.ClassCastException: org.apache.hadoop.hive.ql.exec.vector.DecimalColumnVector cannot be cast to org.apache.hadoop.hive.ql.exec.vector.LongColumnVector at org.apache.hadoop.hive.ql.exec.vector.expressions.VectorUDFMapIndexLongScalar.findScalarInMap(VectorUDFMapIndexLongScalar.java:67) at org.apache.hadoop.hive.ql.exec.vector.expressions.VectorUDFMapIndexBaseScalar.evaluate(VectorUDFMapIndexBaseScalar.java:74) at org.apache.hadoop.hive.ql.exec.vector.VectorSelectOperator.process(VectorSelectOperator.java:146) {code} > Wrong VectorUDFMapIndexBaseScalar child class is used, leading to > ClassCastException > ------------------------------------------------------------------------------------ > > Key: HIVE-25459 > URL: https://issues.apache.org/jira/browse/HIVE-25459 > Project: Hive > Issue Type: Bug > Reporter: László Bodor > Assignee: László Bodor > Priority: Major > > given this query: > {code} > CREATE TABLE map_of_doubles ( > id int, > doubleMap map<double, double> > ) stored as orc; > insert overwrite table map_of_doubles SELECT 1, MAP(CAST(1.0 as DOUBLE), > null, CAST(2.0 as DOUBLE), CAST(3.0 as DOUBLE)); > select id, doubleMap from map_of_doubles; > select id, doubleMap[1] from map_of_doubles group by id, doubleMap[1]; -- > this fails > {code} > error is: > {code} > Caused by: java.lang.ClassCastException: > org.apache.hadoop.hive.ql.exec.vector.DoubleColumnVector cannot be cast to > org.apache.hadoop.hive.ql.exec.vector.LongColumnVector > at > org.apache.hadoop.hive.ql.exec.vector.expressions.VectorUDFMapIndexLongScalar.findScalarInMap(VectorUDFMapIndexLongScalar.java:67) > at > org.apache.hadoop.hive.ql.exec.vector.expressions.VectorUDFMapIndexBaseScalar.evaluate(VectorUDFMapIndexBaseScalar.java:132) > at > org.apache.hadoop.hive.ql.exec.vector.VectorSelectOperator.process(VectorSelectOperator.java:146) > ... 23 more > {code} > I found this error while was trying to write q test cases for all data types > in HIVE-23688, so this issue needs to be addressed first > HIVE-23688 is Parquet-specific, this one is not, it can be reproduced for ORC > and Parquet too -- This message was sent by Atlassian Jira (v8.3.4#803005)