You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Gopal V (JIRA)" <ji...@apache.org> on 2016/06/15 01:27:44 UTC
[jira] [Assigned] (HIVE-14016) Vectorization:
VectorGroupByRollupOperator and VectorGroupByCubeOperator
[ https://issues.apache.org/jira/browse/HIVE-14016?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Gopal V reassigned HIVE-14016:
------------------------------
Assignee: Gopal V
> Vectorization: VectorGroupByRollupOperator and VectorGroupByCubeOperator
> ------------------------------------------------------------------------
>
> Key: HIVE-14016
> URL: https://issues.apache.org/jira/browse/HIVE-14016
> Project: Hive
> Issue Type: Improvement
> Components: Vectorization
> Reporter: Gopal V
> Assignee: Gopal V
>
> Rollup and Cube queries are not vectorized today due to the miss of grouping-sets inside vector group by.
> The cube and rollup operators can be shimmed onto the end of the pipeline by converting a single row writer into a multiple row writer.
> The corresponding non-vec loop is as follows
> {code}
> if (groupingSetsPresent) {
> Object[] newKeysArray = newKeys.getKeyArray();
> Object[] cloneNewKeysArray = new Object[newKeysArray.length];
> for (int keyPos = 0; keyPos < groupingSetsPosition; keyPos++) {
> cloneNewKeysArray[keyPos] = newKeysArray[keyPos];
> }
> for (int groupingSetPos = 0; groupingSetPos < groupingSets.size(); groupingSetPos++) {
> for (int keyPos = 0; keyPos < groupingSetsPosition; keyPos++) {
> newKeysArray[keyPos] = null;
> }
> FastBitSet bitset = groupingSetsBitSet[groupingSetPos];
> // Some keys need to be left to null corresponding to that grouping set.
> for (int keyPos = bitset.nextSetBit(0); keyPos >= 0;
> keyPos = bitset.nextSetBit(keyPos+1)) {
> newKeysArray[keyPos] = cloneNewKeysArray[keyPos];
> }
> newKeysArray[groupingSetsPosition] = newKeysGroupingSets[groupingSetPos];
> processKey(row, rowInspector);
> }
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)