tencent cloud

Description of Supported Type Conversion Functions
Last updated: 2025-05-09 11:51:19
Description of Supported Type Conversion Functions
Last updated: 2025-05-09 11:51:19
In the read-only analysis engine, performing SQL operations may result in implicit conversions caused by mismatches in field types, or explicit type conversions may be specified using the CAST function. The support for type conversions varies across different versions of the read-only analysis engine. This document will provide a detailed description of the supported type conversion.
Note:
When values of different types are compared or calculated in an SQL expression, implicit conversion will occur. All implicit conversion logic that may occur during usage is subject to the conversion support conditions shown in the table below. If a value does not support implicit conversion in a comparison or calculation, an error message will be generated indicating that the conversion is not supported.
Syntax: CAST (expression AS data_type)
In the read-only analysis engine of version 1.2404.x, the detailed information about supported conversion types is shown in the table below.
Source/Destination
Binary
Char
Date
DateTime
Decimal
Double
Float
Real
Signed
Time
Unsigned
Year
Bigint
×
×
×
×
×
Binary
×
×
×
×
×
×
Date
×
×
×
×
×
×
×
×
Datetime
×
×
×
×
×
×
×
×
Decimal
×
×
×
×
×
Double
×
×
×
×
×
×
×
Float
×
×
×
×
×
Real
×
×
×
×
×
×
×
Signed
×
×
×
×
×
Time
×
×
×
×
×
×
×
×
×
×
×
×
Unsigned
×
×
×
×
×
Year
×
×
×
×
×
Varchar
×
×
×
×
×
In the read-only analysis engine of version 2.2410.x, the detailed information about supported conversion types is shown in the table below.
Source/Destination
Int
/Bigint
Binary
Char
Date
DateTime
Decimal
Double
Float
Real
Signed
Time
Unsigned
Year
Int/Bigint
×
Binary
×
×
Date
×
Datetime
×
Decimal
×
Double
×
Float
×
Real
×
Signed
×
Time
×
Unsigned
×
Year
×
Varchar
×
Was this page helpful?
You can also Contact Sales or Submit a Ticket for help.
Yes
No

Feedback