alamb commented on code in PR #11180:
URL: https://github.com/apache/datafusion/pull/11180#discussion_r1667731528
##########
datafusion/sql/src/expr/mod.rs:
##########
@@ -341,7 +278,17 @@ impl<'a, S: ContextProvider> SqlToRel<'a, S> {
}
};
- self.plan_field_access(expr, get_field_access)
+ let mut field_access_expr = RawFieldAccessExpr { expr,
field_access };
+ for planner in self.planners.iter() {
+ match planner.plan_field_access(field_access_expr,
schema)? {
+ PlannerResult::Planned(expr) => return Ok(expr),
+ PlannerResult::Original(expr) => {
+ field_access_expr = expr;
+ }
+ }
+ }
+
+ not_impl_err!("GetFieldAccess not supported by
UserDefinedExtensionPlanners: {field_access_expr:?}")
Review Comment:
Hi @rtyler -- looks to me like the delta.rs code is managing its own
SessionState -- like in
https://github.com/delta-io/delta-rs/blob/main/crates/core/src/delta_datafusion/mod.rs#L1687
(BTW the Delta API is really nicely thought out)
So I think you'll need to register the same planners in your SessionContext
🤔
Helpfully I think @Omega359 just made a PR to make this easier:
https://github.com/apache/datafusion/pull/11296
I feel in general DataFusion is hard to use / configure correctly if you are
using a custom SessionState / configuration -- one potential thing we were
discussing is
https://github.com/apache/datafusion/issues/11182#issuecomment-2200327993 --
I'll file a ticket to make this a thing.
--
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]