-
Notifications
You must be signed in to change notification settings - Fork 6.6k
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
MaterializedMySQL: Support ENUM data type #18310
Comments
hi, #11996 is addressed MySQL engine enum type. |
Maybe someone has an idea what caused this error? SQL Error [50]: ClickHouse exception, code: 50, host: ***, port: 8123; Code: 50, e.displayText() = DB::Exception: Unknown data type family: enum. Maybe you meant: ['Enum','Enum8'] (version 20.13.1.5273 (official build)) |
Short answer: MaterializeMySQL does not support ENUM data type. Long answer: |
It's a good idea to do both :) |
HI! when can we expect support for this functionality (enum)?) |
It seems that there are two approaches that could be explored to implement this, either mapping to ClickHouse enums, or mapping to LowCardinality(String). In both cases one has to account for MySQL's case insensitivity, which means either upper- or lower-casing the enum values when passed as strings. Keeping the numerical values in sync seems doable (since MySQL won't let you remove an enum field that is present in a row), but one has to parse the enum type from information_schema.columns and implicitly assign numeric values from their order. This may cause funkiness down the line if there are materialized views that have outdated enum values, but that could be documented with a caveat. The LowCardinality(String) approach seems more generic, but AFAIK it's going to consume more space, and you will lose the ability to do numerical comparisons. |
@tavplubix what do you think about adding optional case-insensitivity for enum value lookups in CH, and enable this transparently in StorageMaterializeMySQL::read()? We have a summer intern who can implement this. |
This issue is addressed by #25676 |
I was checking out this new feature - on MYSQL I have a table customer
But replication is failing when using MaterializeMySQL
The text was updated successfully, but these errors were encountered: