Data types

更新时间:
复制 MD 格式

SQL field types

SQL supports three main categories of field types:

  • AtomicType: Represents basic atomic types.

  • ArrayType: Represents multi-value fields and contains one AtomicType.

  • MultiSetType: Represents child tables and contains multiple AtomicTypes or ArrayTypes.

AtomicType supports the following types:

  • int8

  • int16

  • int32/integer

  • int64/long

  • float

  • double

  • string

For more information, see System data types.

User-Defined Function (UDF) and User-Defined Aggregate Function (UDAF) parameter types

Parameter types do not support MultiSetType. Other parameter types are the same as SQL field types.

Type conversion

  • Field types in a Ha3 Schema are automatically converted to SQL types. Because SQL does not support unsigned types, they are automatically promoted to signed types during conversion. This process can cause execution faults due to type mismatches or overflows. To prevent these issues, avoid using unsigned types.

  • If type inconsistencies exist, you can use the CAST operator to convert types.