New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MySQL compatibility: native type aliases #49168
Comments
After some initial investigation on this, it looks like we can easily alias these types for Should we assume that any and all SQL commands that give types in MySQL compatibility mode should return MySQL types? If so we do have a complete list of commands we would need to cover? Otherwise would it be sufficient to make this change just for the |
IIRC all BI tools I tested with MySQL protocol used |
I think it makes sense to add a method in IDataType, something like |
Yes, I think it is best to list type aliases only in
As far as I see, only |
@rschu1ze, it's ok to add an additional column to system.columns, displaying SQL-compatible type name. |
Use case
Currently, while using MySQL protocol,
SHOW COLUMNS
orSELECT ... FROM system.columns
returns ClickHouse types instead of MySQL, and this breaks the type introspection for BI tools.For example:
Describe the solution you'd like
Alias ClickHouse type to MySQL native types via MySQL protocol, i.e.,
Boolean
=TINYINT
,String
=VARCHAR
, etc. The preferred way is to have it enabled by default via MySQL protocol, but a server configuration setting will do if it's not possible.Additional context
This is the main problem with QuickSight when accessing ClickHouse via MySQL protocol.
For example, the
cell_towers
data types introspection failed; all the fields exceptDateTime
ones (created
andupdated
, cause MySQL hasDateTime
type natively) were marked asOTHER
and excluded from the dataset.CC @rschu1ze
The text was updated successfully, but these errors were encountered: