alamb commented on code in PR #11494:
URL: https://github.com/apache/datafusion/pull/11494#discussion_r1680046876
##########
datafusion/sql/src/unparser/dialect.rs:
##########
@@ -45,6 +45,13 @@ pub trait Dialect {
fn interval_style(&self) -> IntervalStyle {
IntervalStyle::PostgresVerbose
}
+
+ // Does the dialect use CHAR to cast Utf8 rather than TEXT?
+ // E.g. MySQL requires CHAR instead of TEXT and automatically produces a
string with
+ // the VARCHAR, TEXT or LONGTEXT data type based on the length of the
string
+ fn use_char_for_utf8_cast(&self) -> bool {
Review Comment:
I wonder if there is any reason to ever use other types 🤔
For example, maybe this could return the actual type to use for char rather
than a `bool`
Something like:
```suggestion
/// The SQL type to use for character types
fn use_char_for_utf8_cast(&self) -> sqlparser::ast::DataType {
```
--
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]