gabotechs commented on code in PR #21193:
URL: https://github.com/apache/datafusion/pull/21193#discussion_r3264439641


##########
datafusion/substrait/src/logical_plan/consumer/substrait_consumer.rs:
##########
@@ -481,6 +526,27 @@ pub trait SubstraitConsumer: Send + Sync + Sized {
         };
         substrait_err!("Missing handler for user-defined literals {}", 
type_ref)
     }
+
+    // Lambda related methods
+
+    /// Returns a new instance of this consumer which includes the given 
`lambda_parameters` and the names they got assigned
+    ///
+    /// Note for custom implementations it's possible to embed a 
[DefaultSubstraitLambdaConsumer] and forward this method to it
+    fn with_lambda_parameters(
+        &self,
+        lambda_parameters: &[Type],
+        input_schema: &DFSchema,
+    ) -> datafusion::common::Result<(Vec<String>, Self)>;

Review Comment:
   > If yes, then the scoped-consumer approach here makes sense, but it seems 
like the existing push_outer_schema / pop_outer_schema stack may have the same 
interleaving issue and should probably be addressed separately.
   
   @benbellick is right on point here, I'd aim for consistency in this PR, and 
address separately the multiple threads dealing with the same consumer in a 
different PR.



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to