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/10 14:32:28 UTC

[GitHub] [arrow-datafusion] andygrove opened a new issue, #3781: Implement physical execution of uncorrelated scalar subqueries

andygrove opened a new issue, #3781:
URL: https://github.com/apache/arrow-datafusion/issues/3781

   **Is your feature request related to a problem or challenge? Please describe what you are trying to do.**
   
   We currently support uncorrelated scalar subqueries by translating them into a cross-join. It would likely be more efficient to execute the subquery and update the original plan with the scalar value.
   
   A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 
   
   
   **Describe the solution you'd like**
   
   **Describe alternatives you've considered**
   
   **Additional context**
   


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

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


[GitHub] [arrow-datafusion] xudong963 commented on issue #3781: Implement physical execution of uncorrelated scalar subqueries

Posted by GitBox <gi...@apache.org>.
xudong963 commented on issue #3781:
URL: https://github.com/apache/arrow-datafusion/issues/3781#issuecomment-1273531335

   > A cross join is used as that doesn't require a join condition
   
   Oh, my mistake. The tile is **uncorrelated** scalar subquery.
   
   For correlated scalar subquery, we can change it to left join.


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


[GitHub] [arrow-datafusion] andygrove commented on issue #3781: Implement physical execution of uncorrelated scalar subqueries

Posted by GitBox <gi...@apache.org>.
andygrove commented on issue #3781:
URL: https://github.com/apache/arrow-datafusion/issues/3781#issuecomment-1273441079

   > We can also remove the restriction on the conversion that the subquery should contain an aggregate, and perform the check of being scalar in the physical node.
   
   https://github.com/apache/arrow-datafusion/issues/3725


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


[GitHub] [arrow-datafusion] Dandandan commented on issue #3781: Implement physical execution of uncorrelated scalar subqueries

Posted by GitBox <gi...@apache.org>.
Dandandan commented on issue #3781:
URL: https://github.com/apache/arrow-datafusion/issues/3781#issuecomment-1273434695

   We can also remove the restriction on the conversion that the subquery should contain an aggregate, and perform the check in the physical node.


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


[GitHub] [arrow-datafusion] xudong963 commented on issue #3781: Implement physical execution of uncorrelated scalar subqueries

Posted by GitBox <gi...@apache.org>.
xudong963 commented on issue #3781:
URL: https://github.com/apache/arrow-datafusion/issues/3781#issuecomment-1273477212

   We can just change it to **left join**, and add logic to check if more than 1 row is returned in left join.


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


[GitHub] [arrow-datafusion] Dandandan commented on issue #3781: Implement physical execution of uncorrelated scalar subqueries

Posted by GitBox <gi...@apache.org>.
Dandandan commented on issue #3781:
URL: https://github.com/apache/arrow-datafusion/issues/3781#issuecomment-1273498925

   > We can just change it to **left join**, and add logic to check if more than 1 row is returned in left join.
   
   I don't think that's possible. A cross join is used as that doesn't require a join condition. The cross join is less efficient however, as it repeats the value for the scalar as much as there are values on the left side, and then uses that to filter on (which is less efficient than using a scalar in the filter).


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