You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by pengcheng xiong <px...@hortonworks.com> on 2014/12/12 00:32:01 UTC

Review Request 28973: select constant in union all followed by group by gives wrong result

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

Review request for hive, Ashutosh Chauhan and John Pullokkaran.


Repository: hive-git


Description
-------

Here is the the way to reproduce with q test:
select key from (select '1' as key from src union all select key from src)tab group by key;
will give
OK
NULL
1
This is not correct as src contains many other keys.


Diffs
-----

  ql/src/java/org/apache/hadoop/hive/ql/optimizer/physical/MetadataOnlyOptimizer.java 8551a5b 
  ql/src/java/org/apache/hadoop/hive/ql/optimizer/physical/NullScanTaskDispatcher.java 957c327 
  ql/src/test/queries/clientpositive/metadataOnlyOptimizer.q PRE-CREATION 
  ql/src/test/results/clientpositive/metadataOnlyOptimizer.q.out PRE-CREATION 

Diff: https://reviews.apache.org/r/28973/diff/


Testing
-------


Thanks,

pengcheng xiong


Re: Review Request 28973: select constant in union all followed by group by gives wrong result

Posted by pengcheng xiong <px...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/28973/
-----------------------------------------------------------

(Updated Dec. 13, 2014, 11:52 p.m.)


Review request for hive, Ashutosh Chauhan and John Pullokkaran.


Changes
-------

add one more test case


Repository: hive-git


Description
-------

Here is the the way to reproduce with q test:
select key from (select '1' as key from src union all select key from src)tab group by key;
will give
OK
NULL
1
This is not correct as src contains many other keys.


Diffs (updated)
-----

  ql/src/java/org/apache/hadoop/hive/ql/optimizer/physical/MetadataOnlyOptimizer.java 8551a5b 
  ql/src/java/org/apache/hadoop/hive/ql/optimizer/physical/NullScanTaskDispatcher.java 957c327 
  ql/src/test/queries/clientpositive/metadataOnlyOptimizer.q PRE-CREATION 
  ql/src/test/results/clientpositive/metadataOnlyOptimizer.q.out PRE-CREATION 
  ql/src/test/results/clientpositive/optimize_nullscan.q.out 02636ba 

Diff: https://reviews.apache.org/r/28973/diff/


Testing
-------


Thanks,

pengcheng xiong


Re: Review Request 28973: select constant in union all followed by group by gives wrong result

Posted by pengcheng xiong <px...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/28973/
-----------------------------------------------------------

(Updated Dec. 13, 2014, 12:08 a.m.)


Review request for hive, Ashutosh Chauhan and John Pullokkaran.


Changes
-------

address diff in golden file


Repository: hive-git


Description
-------

Here is the the way to reproduce with q test:
select key from (select '1' as key from src union all select key from src)tab group by key;
will give
OK
NULL
1
This is not correct as src contains many other keys.


Diffs (updated)
-----

  ql/src/java/org/apache/hadoop/hive/ql/optimizer/physical/MetadataOnlyOptimizer.java 8551a5b 
  ql/src/java/org/apache/hadoop/hive/ql/optimizer/physical/NullScanTaskDispatcher.java 957c327 
  ql/src/test/queries/clientpositive/metadataOnlyOptimizer.q PRE-CREATION 
  ql/src/test/results/clientpositive/metadataOnlyOptimizer.q.out PRE-CREATION 

Diff: https://reviews.apache.org/r/28973/diff/


Testing
-------


Thanks,

pengcheng xiong


Re: Review Request 28973: select constant in union all followed by group by gives wrong result

Posted by pengcheng xiong <px...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/28973/
-----------------------------------------------------------

(Updated Dec. 12, 2014, 7:21 a.m.)


Review request for hive, Ashutosh Chauhan and John Pullokkaran.


Changes
-------

address q test failures


Repository: hive-git


Description
-------

Here is the the way to reproduce with q test:
select key from (select '1' as key from src union all select key from src)tab group by key;
will give
OK
NULL
1
This is not correct as src contains many other keys.


Diffs (updated)
-----

  ql/src/java/org/apache/hadoop/hive/ql/optimizer/physical/MetadataOnlyOptimizer.java 8551a5b 
  ql/src/java/org/apache/hadoop/hive/ql/optimizer/physical/NullScanTaskDispatcher.java 957c327 
  ql/src/test/queries/clientpositive/metadataOnlyOptimizer.q PRE-CREATION 
  ql/src/test/results/clientpositive/metadataOnlyOptimizer.q.out PRE-CREATION 

Diff: https://reviews.apache.org/r/28973/diff/


Testing
-------


Thanks,

pengcheng xiong