hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jesús Camacho Rodríguez <jcamachorodrig...@hortonworks.com>
Subject Re: Review Request 56978: HIVE-15994
Date Sat, 25 Feb 2017 09:52:59 GMT


> On Feb. 25, 2017, 1:15 a.m., Ashutosh Chauhan wrote:
> > ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java, line 3091
> > <https://reviews.apache.org/r/56978/diff/1/?file=1645429#file1645429line3091>
> >
> >     This looks incorrect. Per https://msdn.microsoft.com/en-us/library/ms178544.aspx
grouping() in this case needs to return 0. Verified on oracle as well.

IMO it is counter intuitive, as we are grouping by that column, but you are right. I should
have double-checked.

>From the standard:
The grouping operation is of the form GROUPING(<column reference>). The result of such
an invocation is 1 (one) in the case of a row whose values are the results of aggregation
over that <column reference> during the execution of a grouped query containing *CUBE,
ROLLUP, or GROUPING SETS*, and 0 (zero) otherwise.

I am submitting a new patch.


- Jesús


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/56978/#review166792
-----------------------------------------------------------


On Feb. 23, 2017, 9:28 a.m., Jesús Camacho Rodríguez wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/56978/
> -----------------------------------------------------------
> 
> (Updated Feb. 23, 2017, 9:28 a.m.)
> 
> 
> Review request for hive and Ashutosh Chauhan.
> 
> 
> Bugs: HIVE-15994
>     https://issues.apache.org/jira/browse/HIVE-15994
> 
> 
> Repository: hive-git
> 
> 
> Description
> -------
> 
> HIVE-15994
> 
> 
> Diffs
> -----
> 
>   ql/src/java/org/apache/hadoop/hive/ql/parse/CalcitePlanner.java 21bf0202531c23d642d850411fcab99838eafa11

>   ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java 243081175c4993315b32692fd758960fc436c8c2

>   ql/src/test/queries/clientpositive/groupby_grouping_sets_grouping.q 1b753e1bad288802745039df0098a63d3723fc3e

>   ql/src/test/queries/clientpositive/groupby_grouping_window.q b45607428de33411b567f12b9cedbcd3db0f1ded

>   ql/src/test/results/clientpositive/groupby_grouping_sets_grouping.q.out 62f40cd2314760ca94b38516dca0af5ec1cda386

>   ql/src/test/results/clientpositive/groupby_grouping_window.q.out 251f4f78c89a8966616056c746411a96c60d4d7d

> 
> Diff: https://reviews.apache.org/r/56978/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Jesús Camacho Rodríguez
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message