hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "pengcheng xiong" <pxi...@hortonworks.com>
Subject Review Request 29299: order by (limit) meaning for the last subquery of union in Hive is different from other main stream RDBMS
Date Mon, 22 Dec 2014 05:43:25 GMT

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

Review request for hive and John Pullokkaran.


Repository: hive-git


Description
-------

Currently Hive will treat

select id from A 
union all
select id from B
order by id

as

select id from A 
union all
(select id from B
order by id)

However, it should be treated as

(select id from A 
union all
select id from B)
order by id


Diffs
-----

  ql/src/java/org/apache/hadoop/hive/ql/parse/QB.java 0497e5a 
  ql/src/java/org/apache/hadoop/hive/ql/parse/QBParseInfo.java 02c4be9 
  ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java 29be691 
  ql/src/test/queries/clientpositive/unionOB_1.q PRE-CREATION 
  ql/src/test/queries/clientpositive/unionOB_2.q PRE-CREATION 
  ql/src/test/results/clientpositive/unionOB_1.q.out PRE-CREATION 
  ql/src/test/results/clientpositive/unionOB_2.q.out PRE-CREATION 

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


Testing
-------


Thanks,

pengcheng xiong


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