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/04/27 19:53:15 UTC

[GitHub] [arrow-datafusion] andygrove commented on a diff in pull request #2354: Add SQL query planner support for Scalar Subqueries

andygrove commented on code in PR #2354:
URL: https://github.com/apache/arrow-datafusion/pull/2354#discussion_r860191346


##########
datafusion/core/src/sql/planner.rs:
##########
@@ -1913,6 +1911,16 @@ impl<'a, S: ContextProvider> SqlToRel<'a, S> {
         })
     }
 
+    fn parse_scalar_subquery(
+        &self,
+        subquery: &Query,
+        input_schema: &DFSchema,
+    ) -> Result<Expr> {
+        Ok(Expr::ScalarSubquery(Subquery {
+            subquery: Arc::new(self.subquery_to_plan(subquery.clone(), input_schema)?),

Review Comment:
   I was thinking that an optimizer rule should perform this type of validation check and this would cover both the SQL and DataFrame API (and maybe substrait one day) use cases.



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