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 B6611200C4C for ; Tue, 4 Apr 2017 09:38:54 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id B4BE2160B90; Tue, 4 Apr 2017 07:38:54 +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 06A8E160B81 for ; Tue, 4 Apr 2017 09:38:53 +0200 (CEST) Received: (qmail 22308 invoked by uid 500); 4 Apr 2017 07:38:52 -0000 Mailing-List: contact dev-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 dev@hive.apache.org Received: (qmail 22297 invoked by uid 99); 4 Apr 2017 07:38:52 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Apr 2017 07:38:52 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id E6DBB180533; Tue, 4 Apr 2017 07:38:51 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 3.75 X-Spam-Level: *** X-Spam-Status: No, score=3.75 tagged_above=-999 required=6.31 tests=[HEADER_FROM_DIFFERENT_DOMAINS=0.001, HTML_MESSAGE=2, KAM_LAZY_DOMAIN_SECURITY=1, KAM_LOTSOFHASH=0.25, KAM_NUMSUBJECT=0.5, RP_MATCHES_RCVD=-0.001] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id FrrJHFSlqIcl; Tue, 4 Apr 2017 07:38:50 +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 A12225FB62; Tue, 4 Apr 2017 07:38:49 +0000 (UTC) Received: from reviews.apache.org (unknown [10.41.0.12]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 16DD6E036E; Tue, 4 Apr 2017 07:38:49 +0000 (UTC) Received: from reviews-vm2.apache.org (localhost [IPv6:::1]) by reviews.apache.org (ASF Mail Server at reviews-vm2.apache.org) with ESMTP id 0783CC41075; Tue, 4 Apr 2017 07:38:49 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============5048143690853166892==" MIME-Version: 1.0 Subject: Re: Review Request 57094: HIVE-15996 From: =?utf-8?q?Jes=C3=BAs_Camacho_Rodr=C3=ADguez?= To: Ashutosh Chauhan Cc: hive , =?utf-8?q?Jes=C3=BAs_Camacho_Rodr=C3=ADguez?= Date: Tue, 04 Apr 2017 07:38:49 -0000 Message-ID: <20170404073849.29826.26741@reviews-vm2.apache.org> X-ReviewBoard-URL: https://reviews.apache.org/ Auto-Submitted: auto-generated Sender: =?utf-8?q?Jes=C3=BAs_Camacho_Rodr=C3=ADguez_=3Cnoreply=40reviews=2E?=@reviews.apache.org, =?utf-8?q?apache=2Eorg=3E?=@reviews.apache.org X-ReviewGroup: hive X-Auto-Response-Suppress: DR, RN, OOF, AutoReply X-ReviewRequest-URL: https://reviews.apache.org/r/57094/ X-Sender: =?utf-8?q?Jes=C3=BAs_Camacho_Rodr=C3=ADguez_=3Cnoreply=40reviews?= =?utf-8?b?LmFwYWNoZS5vcmc+?= References: <20170329231934.51543.61346@reviews-vm2.apache.org> In-Reply-To: <20170329231934.51543.61346@reviews-vm2.apache.org> Reply-To: =?utf-8?q?Jes=C3=BAs_Camacho_Rodr=C3=ADguez_=3Cjcamachorodriguez?=@reviews.apache.org, =?utf-8?q?=40hortonworks=2Ecom=3E?=@reviews.apache.org X-ReviewRequest-Repository: hive-git archived-at: Tue, 04 Apr 2017 07:38:54 -0000 --===============5048143690853166892== MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit > On March 29, 2017, 11:19 p.m., Ashutosh Chauhan wrote: > > ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java > > Line 3091 (original), 3096 (patched) > > > > > > This should be 1 > > Jesús Camacho Rodríguez wrote: > I am not sure about that... My understanding was that if there are no grouping sets in the query, value should always be 0 (I think we discussed this previously, but I do not recall for sure). > > Ashutosh Chauhan wrote: > Can you test this on postgres? I think I tested this previously and found that this should be 0. I have checked in Postgres and it is correct as it is (0 if there are no grouping sets). jcamachorodriguez=# create table T1(key INT, value INT); CREATE TABLE jcamachorodriguez=# insert into T1 values (2, 3); INSERT 0 1 jcamachorodriguez=# select key, value, grouping(key, value) from T1 group by key, value; key | value | grouping -----+-------+---------- 2 | 3 | 0 (1 row) jcamachorodriguez=# select key, value, grouping(key, value) from T1 group by rollup(key, value); key | value | grouping -----+-------+---------- 2 | 3 | 0 2 | | 1 | | 3 (3 rows) jcamachorodriguez=# - Jesús ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/57094/#review170498 ----------------------------------------------------------- On April 3, 2017, 8:09 a.m., Jesús Camacho Rodríguez wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/57094/ > ----------------------------------------------------------- > > (Updated April 3, 2017, 8:09 a.m.) > > > Review request for hive and Ashutosh Chauhan. > > > Bugs: HIVE-15996 > https://issues.apache.org/jira/browse/HIVE-15996 > > > Repository: hive-git > > > Description > ------- > > HIVE-15996 > > > Diffs > ----- > > ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java f2a6ade1ae15afa8887cef885f308202c44b404d > ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFGrouping.java cc015268de0ab1e32401c1cf7c21502fb2a45331 > ql/src/test/queries/clientpositive/groupby_grouping_sets_grouping.q 34759cab03f865a833ff0ecc8daae500edcadaa4 > ql/src/test/queries/clientpositive/vector_groupby_grouping_sets_grouping.q 7b7c8927d9008a44e380f752fb9713892f7f9630 > ql/src/test/results/clientpositive/groupby_grouping_sets_grouping.q.out b82d9c273bb9d1a70c6b88bf3cb2033d1a2978f9 > ql/src/test/results/clientpositive/llap/vector_groupby_grouping_sets_grouping.q.out 8696207c6c24516e7c65cb1340bf774a97bac2d0 > > > Diff: https://reviews.apache.org/r/57094/diff/3/ > > > Testing > ------- > > > Thanks, > > Jesús Camacho Rodríguez > > --===============5048143690853166892==--