Github user nsyca commented on the issue:

    https://github.com/apache/spark/pull/14411
  
    Two good cases, which return the same result set, with and without this 
proposed fix:
    
    sql("select c1 from t1 where exists (select 1 from t2 where t1.c1=t2.c2) 
and exists (select 1 from t2 LIMIT 1)").show
    
    The above query will return both rows from T1.
    
    sql("select c1 from t1 where exists (select 1 from (select 1 from t2 limit 
1) where t1.c1=t2.c2)").show 
    
    This one above will return 1 row but which row will return is 
non-deterministic depending on what the first row from T2 will return from the 
innermost subquery.



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to