-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/71708/
-----------------------------------------------------------
(Updated Nov. 11, 2019, 2:25 p.m.)
Review request for hive, Gopal V, Jesús Camacho Rodríguez, Zoltan Haindrich,
and Rajesh Balamohan.
Bugs: HIVE-20148 and HIVE-22435
https://issues.apache.org/jira/browse/HIVE-20148
https://issues.apache.org/jira/browse/HIVE-22435
Repository: hive-git
Description
-------
Exception when using VectorTopNKeyOperator operator
===================================================
VectorTopNKeyOperator extends TopNKeyOperator and it calls it's
super.initializeOp method
https://github.com/apache/hive/blob/5c8392468cb581f53b6cb55d201fc933dca025e3/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorTopNKeyOperator.java#L71
which is focusing on non-vectorized execution.
Fix: Derive VectorTopNKeyOperator from Oprator instead of TopNKeyOperator and
do the initialization
- map the key columns with the inputObjInspectors
- setup comparators for mapped keys using the objectInspector extracted from
the the inputObjInspectors
- add KeyWeapped class for storing key entries in the priorityQueue
Diffs (updated)
-----
ql/src/java/org/apache/hadoop/hive/ql/exec/TopNKeyFilter.java PRE-CREATION
ql/src/java/org/apache/hadoop/hive/ql/exec/TopNKeyOperator.java 4734824b73
ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorTopNKeyOperator.java
c80bc804a2
ql/src/java/org/apache/hadoop/hive/ql/exec/vector/wrapper/VectorHashKeyWrapperBatch.java
dd31991d03
ql/src/java/org/apache/hadoop/hive/ql/exec/vector/wrapper/VectorHashKeyWrapperGeneralComparator.java
PRE-CREATION
ql/src/test/queries/clientpositive/vector_topnkey.q e1b7d26afe
ql/src/test/results/clientpositive/llap/vector_topnkey.q.out d859270ff0
serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/ObjectComparator.java
PRE-CREATION
Diff: https://reviews.apache.org/r/71708/diff/2/
Changes: https://reviews.apache.org/r/71708/diff/1-2/
Testing
-------
run q test: vector_topnkey and limit_pushdown3 after applying the patch for
TopNKey pushdown
(https://issues.apache.org/jira/secure/attachment/12984389/HIVE-20150.15.patch)
Thanks,
Krisztian Kasa