kczimm commented on code in PR #15980: URL: https://github.com/apache/datafusion/pull/15980#discussion_r2080056995
########## datafusion/expr/src/expr.rs: ########## @@ -1775,6 +1775,27 @@ impl Expr { | Expr::SimilarTo(Like { expr, pattern, .. }) => { rewrite_placeholder(pattern.as_mut(), expr.as_ref(), schema)?; } + Expr::InSubquery(InSubquery { + expr, + subquery, + negated: _, + }) => { + let subquery_schema = subquery.subquery.schema(); + let fields = subquery_schema.fields(); + + // only supports subquery with exactly 1 field + if let [first_field] = &fields[..] { Review Comment: The subquery should only return one column. https://github.com/apache/datafusion/blob/main/datafusion/sql/src/expr/subquery.rs#L120 -- 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-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org