Support Functions and Casts
When you create a distinct type, HCL
OneDB™ automatically defines
two explicit casts:
- A cast from the distinct type to its source type
- A cast from the source type to the distinct type
Because the two data types have the same representation (the same length and alignment), no support functions are required to implement the casts.
You can create an implicit cast between a distinct type and its source type. To create an implicit cast, use the Table Options clause to specify the format of the external data. You must first drop the default explicit cast, however, between the distinct type and its source type.
All support functions and casts that are defined on the source type can be used on the distinct type. Casts and support functions that are defined on the distinct type, however, are not available to the source type. Use the Table Options clause to specify the format of the external data.