alexanderbianchi commented on code in PR #26890: URL: https://github.com/apache/datafusion/pull/26890#discussion_r4526236816
########## docs/source/library-user-guide/upgrading/56.0.0.md: ########## @@ -1336,3 +1306,33 @@ without declaring one, use `FileScanConfigBuilder::with_preserve_order(true)`. Code that reads `FileScanConfig::preserve_order` to decide whether files may be reordered should call `FileScanConfig::preserves_file_order()` instead, which also accounts for the output ordering. + +### Substrait consumers use explicit scope context + +Relation and expression callbacks on `SubstraitConsumer` now take a final +`&SubstraitConsumerContext` argument. Forward that context when delegating to the +standard conversion helpers or consuming child relations and expressions. +`from_substrait_plan` and `from_substrait_plan_with_consumer` still create the root +context for you. When starting a new conversion directly through a helper, use +`SubstraitConsumerContext::default()`; nested conversions must receive the current +context. + +Remove implementations of `push_outer_schema`, `pop_outer_schema`, +`get_outer_schema`, `push_lambda_parameters`, `pop_lambda_parameters`, and +`lambda_variable`, and remove embedded `DefaultSubstraitLambdaConsumer` values. +The standard handlers resolve scopes through the context. Custom handlers that +introduce scopes should use `context.with_outer_schema(...)` or +`context.with_lambda_parameters(...)` and pass the resulting child context to +nested conversions. There is no matching pop operation; the parent context stays +unchanged on success, error, and cancellation. + +Input consumption remains sequential. Custom consumers Review Comment: I think humans also screw this up 😆 -- 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]
