theirix commented on issue #12709: URL: https://github.com/apache/datafusion/issues/12709#issuecomment-4000543632
> > What do you think of having a dialect-dependent implementation via customising `ExprPlanner`? For Spark/Databricks we plan a binary | binary -> text, while for others, we use binary. So we can have expected behaviour for every platform. > > Do we have existing precedent for such customization at that level? Not quiet. The idea is to make a plan using two UDFs in `ExprPlanner::plan_binary_op` - one `ConcatBinary` with text-to-binary and the classical `Concat`. The planner chooses between them based on a dialect. A good example is `NestedFunctionPlanner::plan_binary_op` Since it had not been done before, I stumbled upon maintaining an actual config with a dialect in the expression planner, so we can react to `set dialect` dynamically. A session state cannot be passed to `SessionStateBuilder::with_default_features`, where default planners are instantiated early, while the state is rebuilt often via `new_from_existing`. I believe it could be done with some redesign, but it's worth confirming if it's worth it. -- 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]
