tencent cloud

Description of Supported Type Conversion Functions
Last updated: 2025-06-03 16:24:47
Description of Supported Type Conversion Functions
Last updated: 2025-06-03 16:24:47
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:
If there are different types of values for comparison or calculation in a SQL expression, implicit conversion will be triggered. All implicit conversion logic that occurs during usage is subject to the conversion support shown in the table below. If there are operation scenarios such as comparing or calculating any value which does not support implicit conversion, an error message will be displayed, indicating that such 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/Target
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/Target
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