kasakrisz opened a new pull request #1525:
URL: https://github.com/apache/hive/pull/1525


   ### What changes were proposed in this pull request?
   Fix incorrect result when subquey in exists contains limit.
   
   ### Why are the changes needed?
   ```
   create table web_sales (ws_order_number int, ws_warehouse_sk int) stored as 
orc;
   
   insert into web_sales values
   (1, 1),
   (1, 2),
   (2, 1),
   (2, 2);
   ```
   Query
   ```
   select * from web_sales ws1
   where exists (select 1 from web_sales ws2 where ws1.ws_order_number = 
ws2.ws_order_number limit 1);
   ```
   should return 4 four rows but returns only 2.
   
   ### Does this PR introduce _any_ user-facing change?
   No
   
   ### How was this patch tested?
   New q test added.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org
For additional commands, e-mail: gitbox-h...@hive.apache.org

Reply via email to