Open alamb opened 3 days ago
Well, small issue. ScalarFunctionArgs
is in datafusion-expr
which can't use SessionConfig
directly since it's in datafusion-execution
which depends on datafusion-expr
which would cause a circular dependency. We can use ConfigOptions
there which would give us access to all config except the opaque extensions in SessionConfig
which I think is acceptable.
Great work!
Started delving into this trying to find a good way to impl. Trying to add config_options: ConfigOptions
to ScalarFunctionExpr
Having lots of fun with eq and hash with SessionConfig and f64 atm.
I wonder if we can use this trait: https://docs.rs/datafusion/latest/datafusion/catalog/trait.Session.html
We could but it wouldn't solve the issue. The issue is PhysicalExpr requires implementations to impl Eq and Hash or to have implementations for DynEq and DynHash. That is fine until something like SessionConfig which doesn't is introduced. I am looking at updating the either the 'config_namespace' macro or add explicit implementations for 'ScalarFunctionExpr' to try and impl either of the above and use f64.to_bits() and f64::from_bits(..) to handle the problematic f64's in the config. I think it's possible
It makes sense to me to move SessionConfig
to common or common-runtime crate
take
It makes sense to me to move
SessionConfig
to common or common-runtime crate
I agree
I mistyped above - I meant we couldn't use SessionContext, not SessionConfig. Sorry about the confusion. ... or not. I need more caffeine today. PR uses ConfigOptions.
Is your feature request related to a problem or challenge?
@Omega359 noted that by adding
SessionConfig
to theScalarFunctionArgs
unblock several tasks such asDescribe the solution you'd like
Add
&SessionConfig
toScalarFunctionArgs
, and ideally add a test that shows the config gets through.Describe alternatives you've considered
No response
Additional context
We should try and get this done before DataFusion 44 is released so it isn't a breaking change
13334