[ https://issues.apache.org/jira/browse/HIVE-29197?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Naresh P R updated HIVE-29197: ------------------------------ Summary: CBO should bailout vectorizing map vertex for aggregates with more than 1 groupby key and one of them is partition column with constant filter (was: Vector should bailout for more than 1 groupby key) > CBO should bailout vectorizing map vertex for aggregates with more than 1 > groupby key and one of them is partition column with constant filter > ---------------------------------------------------------------------------------------------------------------------------------------------- > > Key: HIVE-29197 > URL: https://issues.apache.org/jira/browse/HIVE-29197 > Project: Hive > Issue Type: Bug > Reporter: Naresh P R > Priority: Major > Attachments: repro.q > > > Hive execution fails with following exception if partition column is included > in aggregation and filter condition has equals filter with single constant. > eg., > {code:java} > select count(distinct pid, full_date) as CNT from test_vector where full_date > in ('20240305') {code} > {code:java} > Caused by: java.lang.RuntimeException: Map operator initialization failed > at > org.apache.hadoop.hive.ql.exec.tez.MapRecordProcessor.init(MapRecordProcessor.java:351) > at > org.apache.hadoop.hive.ql.exec.tez.TezProcessor.initializeAndRunProcessor(TezProcessor.java:292) > ... 15 more > Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: Constructor > VectorUDAFCount([class > org.apache.hadoop.hive.ql.exec.vector.VectorAggregationDesc, int]) not > available > at > org.apache.hadoop.hive.ql.exec.vector.VectorGroupByOperator.instantiateExpression(VectorGroupByOperator.java:1277) > at > org.apache.hadoop.hive.ql.exec.vector.VectorGroupByOperator.initializeOp(VectorGroupByOperator.java:1150) > at org.apache.hadoop.hive.ql.exec.Operator.initialize(Operator.java:360) > at org.apache.hadoop.hive.ql.exec.Operator.initialize(Operator.java:549) > at > org.apache.hadoop.hive.ql.exec.Operator.initializeChildren(Operator.java:503) > at org.apache.hadoop.hive.ql.exec.Operator.initialize(Operator.java:369) > at org.apache.hadoop.hive.ql.exec.Operator.initialize(Operator.java:549) > at > org.apache.hadoop.hive.ql.exec.Operator.initializeChildren(Operator.java:503) > at org.apache.hadoop.hive.ql.exec.Operator.initialize(Operator.java:369) > at org.apache.hadoop.hive.ql.exec.Operator.initialize(Operator.java:549) > at > org.apache.hadoop.hive.ql.exec.Operator.initializeChildren(Operator.java:503) > at org.apache.hadoop.hive.ql.exec.Operator.initialize(Operator.java:369) > at > org.apache.hadoop.hive.ql.exec.vector.VectorMapOperator.initializeMapOperator(VectorMapOperator.java:588) > at > org.apache.hadoop.hive.ql.exec.tez.MapRecordProcessor.init(MapRecordProcessor.java:314) > ... 16 more > Caused by: java.lang.NoSuchMethodException: > org.apache.hadoop.hive.ql.exec.vector.expressions.aggregates.VectorUDAFCount.<init>(org.apache.hadoop.hive.ql.exec.vector.VectorAggregationDesc,int) > at java.base/java.lang.Class.getConstructor0(Class.java:3761) > at java.base/java.lang.Class.getConstructor(Class.java:2442) > at > org.apache.hadoop.hive.ql.exec.vector.VectorGroupByOperator.instantiateExpression(VectorGroupByOperator.java:1274) > ... 29 more{code} > Attaching repro sql file [^repro.q] > CBO considers it as 1 column and 1 constant, but execution fails. > -- This message was sent by Atlassian Jira (v8.20.10#820010)