alamb commented on code in PR #2354:
URL: https://github.com/apache/arrow-datafusion/pull/2354#discussion_r860185643
##########
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:
So the scalar subquery must produce a single row typically otherwise it is a
runtime error
Do you have thoughts about in what stage a query like the following would
throw an error?
```
"SELECT p.id, (SELECT id FROM person) FROM person p"
```
--
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]