[ https://issues.apache.org/jira/browse/HIVE-22805?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17029345#comment-17029345 ]
Ramesh Kumar Thangarajan commented on HIVE-22805: ------------------------------------------------- Your patch looks good to me. Thank you for fixing this the right way!! Is it ok to call shallowCopyTo from copySelected? Do you think it makes sense to implement shallowCopyTo() for classes inherited from MultiValuedColumnVector? Although we do not call shallowCopyTo() directly for Map or List, if we have a case with nested list like: {code:java} select IF(1=1, ARRAY(ARRAY("a", "b"),ARRAY("c", "d")), NULL) {code} , then we may throw some similar error since MultiValuedColumnVector::shallowCopyTo is not implemented – since we have the new ListColumnVector::copySelected calling the shallowCopyTo for its child and similarly for MapColumnVector too. > Vectorization with conditional array or map is not implemented and throws an > error > ---------------------------------------------------------------------------------- > > Key: HIVE-22805 > URL: https://issues.apache.org/jira/browse/HIVE-22805 > Project: Hive > Issue Type: Bug > Components: Vectorization > Reporter: Peter Vary > Assignee: Peter Vary > Priority: Major > Attachments: HIVE-22805.2.patch, HIVE-22805.patch > > > The following queries throw an "Not supported" Exception: > {code} > DROP TABLE IF EXISTS cond_vector; > CREATE TABLE cond_vector(a STRING) STORED AS ORC; > INSERT OVERWRITE TABLE cond_vector VALUES("a/b"); > set hive.fetch.task.conversion=minimal; > set hive.execution.mode=container; > SELECT IF(1=1, MAP("a","b"), NULL) FROM cond_vector; > EXPLAIN VECTORIZATION DETAIL SELECT IF(1=1, MAP("Mathematics","78"), NULL) > FROM cond_vector; > SELECT IF(1=1, ARRAY("c", "d"), NULL) FROM cond_vector; > EXPLAIN VECTORIZATION DETAIL SELECT IF(1=1, ARRAY("a", "b"), NULL) FROM > cond_vector; > {code} > One example of the Exception (maybe not exactly this on 4.0.0 branch, but > close enough to check): > {code} > Caused by: java.lang.RuntimeException: Not supported > at > org.apache.hadoop.hive.ql.exec.vector.ListColumnVector.copySelected(ListColumnVector.java:161) > at > org.apache.hadoop.hive.ql.exec.vector.expressions.IfExprCondExprNull.evaluate(IfExprCondExprNull.java:87) > at > org.apache.hadoop.hive.ql.exec.vector.expressions.IfExprCondExprCondExpr.evaluate(IfExprCondExprCondExpr.java:95) > at > org.apache.hadoop.hive.ql.exec.vector.expressions.IfExprCondExprBase.conditionalEvaluate(IfExprCondExprBase.java:68) > at > org.apache.hadoop.hive.ql.exec.vector.expressions.IfExprCondExprCondExpr.evaluate(IfExprCondExprCondExpr.java:110) > at > org.apache.hadoop.hive.ql.exec.vector.expressions.IfExprCondExprCondExpr.evaluate(IfExprCondExprCondExpr.java:95) > at > org.apache.hadoop.hive.ql.exec.vector.VectorSelectOperator.process(VectorSelectOperator.java:146) > > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005)