avantgardnerio commented on code in PR #4701:
URL: https://github.com/apache/arrow-datafusion/pull/4701#discussion_r1054714428
##########
datafusion/sql/src/planner.rs:
##########
@@ -970,6 +970,45 @@ impl<'a, S: ContextProvider> SqlToRel<'a, S> {
}
}
+ fn infer_placeholder_types(&self, expr: &mut Expr, schema: &DFSchema) ->
Result<()> {
+ match expr {
+ Expr::BinaryExpr(BinaryExpr {
+ ref mut left,
+ ref mut right,
+ ..
+ }) => {
+ self.infer_placeholder_types(left, schema)?;
+ self.infer_placeholder_types(right, schema)?;
+ let lt = left.get_type(schema);
+ let rt = right.get_type(schema);
+ match (left, rt) {
+ (
+ box Expr::Placeholder {
Review Comment:
The `box` keyword let me destructure the box in a mutable way, which let me
avoid having to implement walking every type of possible expression and
regenerating the whole tree. I'm open to advice on how to do this without using
an experimental feature.
--
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]