Support custom scalar functions in MySQL unparser dialect#356
Support custom scalar functions in MySQL unparser dialect#356phillipleblanc wants to merge 4 commits into
Conversation
| }, | ||
| }; | ||
|
|
||
| pub struct MySqlDialect { |
There was a problem hiding this comment.
Should we move this into Datafusion crate to be consistent with DuckDB dialect?
https://github.com/apache/datafusion/blob/a256eb4e45d85701e9535c32eb84260c6817522a/datafusion/sql/src/unparser/dialect.rs#L365
There was a problem hiding this comment.
It feels a bit weird that this would require a core datafusion change. I'm actually thinking we should try to remove the trait parameter with_custom_scalar_overrides from unparser::Dialect, since it will panic on all dialects currently except DuckDB - so you already need to know which specific dialect instance you have to know if it supportswith_custom_scalar_overrides. And at that point you might as well just only add that function to the specific structs that support it instead of fake supporting it via the trait.
|
Turns out I don't need this change |
Allows the MySQLTableFactory to have an optional customized MySQL dialect.
Adds a new MySQLDialect that implements
with_custom_scalar_overridesto allow consumers to specify their own MySQL scalar function overrides.