You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/10/07 13:27:29 UTC

[GitHub] [arrow-datafusion] andygrove commented on issue #3725: Add support for wider range of scalar subqueries in `scalar_subquery_to_join`

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: github-unsubscribe@arrow.apache.org

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