sgrebnov commented on code in PR #11494: URL: https://github.com/apache/datafusion/pull/11494#discussion_r1680208153
########## 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: @alamb - updated: added the following Dialect configuration: ```rust // The SQL type to use for Arrow Utf8 unparsing // Most dialects use VARCHAR, but some, like MySQL, require CHAR fn utf8_cast_dtype(&self) -> ast::DataType { ast::DataType::Varchar(None) } // The SQL type to use for Arrow LargeUtf8 unparsing // Most dialects use TEXT, but some, like MySQL, require CHAR fn large_utf8_cast_dtype(&self) -> ast::DataType { ast::DataType::Text } ``` -- 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: github-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org