-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Compatibility of CAST operator. #7119
Copy link
Copy link
Labels
Description
Use case
CAST in ClickHouse work in different way than in other DBMS.
-
Nullable is the part of data type. When you cast Nullable(UInt8) to String, you will get String.
In other databases nullability is kept with CAST. -
You can specify "conversion instruction" instead of a type name inside CAST.
Example:CAST(x AS UNSIGNED)will cast Int8 to UInt8, Int16 to UInt16 and so on.
Describe the solution you'd like
- Implement
cast_keep_nullablesetting. - Add a notion of named conversion instructions.
Reactions are currently unavailable