vbarua commented on code in PR #13803: URL: https://github.com/apache/datafusion/pull/13803#discussion_r1894475383
########## datafusion/substrait/src/logical_plan/consumer.rs: ########## @@ -262,7 +718,25 @@ async fn except_rels( /// Convert Substrait Plan to DataFusion LogicalPlan pub async fn from_substrait_plan( - state: &dyn SubstraitPlanningState, + state: &SessionState, + plan: &Plan, +) -> Result<LogicalPlan> { + // Register function extension + let extensions = Extensions::try_from(&plan.extensions)?; + if !extensions.type_variations.is_empty() { + return not_impl_err!("Type variation extensions are not supported"); + } + + let consumer = DefaultSubstraitConsumer { + extensions: &extensions, Review Comment: I do want to streamline the API further, but in the future 😅 Initialising the consumer directly from the plan makes sense to me, because we always need the extensions. -- 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