andygrove commented on issue #3725:
URL: 
https://github.com/apache/arrow-datafusion/issues/3725#issuecomment-1271593583

   This is going to be harder than I realized. We need to check that scalar 
subqueries return a single row at some point during execution. I am not sure 
that we can translate queries to joins if there is the possibility of more than 
one row being returned.
   
   Postgres example:
   
   ```
   postgres=# select * from test t1 where a = (select distinct b from test 
where b > 7);
    a | b 
   ---+---
   (0 rows)
   
   postgres=# select * from test t1 where a = (select distinct b from test 
where b > 3);
   ERROR:  more than one row returned by a subquery used as an expression
   ```


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to