Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 67CC7200C37 for ; Sun, 19 Mar 2017 16:38:51 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 6674E160B7D; Sun, 19 Mar 2017 15:38:51 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id ADE31160B6E for ; Sun, 19 Mar 2017 16:38:50 +0100 (CET) Received: (qmail 54022 invoked by uid 500); 19 Mar 2017 15:38:44 -0000 Mailing-List: contact issues-help@hive.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hive.apache.org Delivered-To: mailing list issues@hive.apache.org Received: (qmail 54012 invoked by uid 99); 19 Mar 2017 15:38:44 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 19 Mar 2017 15:38:44 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 4198CC0BF8 for ; Sun, 19 Mar 2017 15:38:44 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.651 X-Spam-Level: X-Spam-Status: No, score=0.651 tagged_above=-999 required=6.31 tests=[RP_MATCHES_RCVD=-0.001, SPF_NEUTRAL=0.652] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id DCFaKedDnxWx for ; Sun, 19 Mar 2017 15:38:43 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id B31435FC5F for ; Sun, 19 Mar 2017 15:38:42 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id E8FF6E0502 for ; Sun, 19 Mar 2017 15:38:41 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 9C5B5254CB for ; Sun, 19 Mar 2017 15:38:41 +0000 (UTC) Date: Sun, 19 Mar 2017 15:38:41 +0000 (UTC) From: "Matt McCline (JIRA)" To: issues@hive.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HIVE-14016) Vectorization: Add support for Grouping Sets MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Sun, 19 Mar 2017 15:38:51 -0000 [ https://issues.apache.org/jira/browse/HIVE-14016?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15931748#comment-15931748 ] Matt McCline commented on HIVE-14016: ------------------------------------- Committed to master. Thanks [~gopalv] and [~jcamachorodriguez]. > Vectorization: Add support for Grouping Sets > -------------------------------------------- > > Key: HIVE-14016 > URL: https://issues.apache.org/jira/browse/HIVE-14016 > Project: Hive > Issue Type: Improvement > Components: Vectorization > Reporter: Gopal V > Assignee: Matt McCline > Fix For: 2.2.0 > > Attachments: HIVE-14016.01.patch, HIVE-14016.02.patch, HIVE-14016.03.patch, HIVE-14016.04.patch, HIVE-14016.05.patch, HIVE-14016.06.patch, HIVE-14016.07.patch, HIVE-14016.091.patch, HIVE-14016.092.patch, HIVE-14016.093.patch, HIVE-14016.09.patch > > > 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.15#6346)