Data Type Category | Data Type | Description |
Number | ByteType:BYTE, TINYINT | 1-byte signed integer. Range of the number: -128 to 127. |
| ShortType:SHORT, SMALLINT | 2-byte signed integer. Range of the number: -32768 to 3276. |
| IntegerType:INT, INTEGER | 4-byte signed integer. Range of the number: -2147483648 to 214748364. |
| LongType:LONG, BIGINT | 8-byte signed integer. Range: -9223372036854775808 to 922337203685477580. |
| FloatType:FLOAT, REAL | 4-byte single-precision floating-point number |
| DoubleType:DOUBLE | 8-byte double-precision floating-point number |
| DecimalType:DECIMAL, DEC, NUMERIC | Signed decimal number with random precision |
String | StringType:STRING | String value. Example: 'abc' |
Byte | BinaryType:BINARY | Byte sequence value. |
Boolean | BooleanType:BOOLEAN | Boolean value. Example: true/false |
Time | DateType:DATE | Value consisting of the year, month, and day fields, without the time zone. Example: '2023-10-01' |
| TimestampType:TIMESTAMP | Value consisting of the year, month, day, hour, minute, and second fields. Example: '2023-10-01 23:59:59' |
Complex type | ArrayType:ARRAY<element_type> | Sequence value consisting of elements of the specified type. Example: array<int> |
| MapType:MAP<key_type, value_type> | Value consisting of a group of key-value pairs. key_type indicates the type of keys, and value_type indicates the type of values. Example: map<string, int> |
| StructType:STRUCT<field1_name: field1_type, field2_name: field2_type, …> | Struct value consisting of fields Example: struct<id:int, grade:string> |
Was this page helpful?