Sevenannn opened a new pull request, #13428: URL: https://github.com/apache/datafusion/pull/13428
## Which issue does this PR close? N/A ## Rationale for this change When unparsing `CharacterLengthFunc` scalar function to DuckDB & SQLite syntax SQL query, the `CharacterLengthFunc` scalar function need to be unparsed to `length`, since `length` is the equivalence of `CharacterLengthFunc` in DuckDB & SQLite. DuckDB [length()](https://duckdb.org/docs/sql/functions/char.html#lengthstring) SQLite [length()](https://www.sqlite.org/lang_corefunc.html#length) ## What changes are included in this PR? - Add struct `DuckDBDialect`, which implements the `Dialect` trait - Add new method `character_length_style` for `Dialect` trait for determining the `CharacterLengthStyle` to use for a dialect - Add helper function `character_length_to_sql`, which unparses the `CharacterLengthFunc` to `length` or `character_length` based on `CharacterLengthStyle` ## Are these changes tested? Yes ## Are there any user-facing changes? No -- 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]
