Data types
This topic describes the data types supported by Fluss.
Data types
|
Data type |
Description |
|
BOOLEAN |
A Boolean value that supports three-valued logic: TRUE, FALSE, or UNKNOWN. |
|
TINYINT |
A 1-byte signed integer with a range from -128 to 127. |
|
SMALLINT |
A 2-byte signed integer with a range from -32,768 to 32,767. |
|
INT |
A 4-byte signed integer with a range from -2,147,483,648 to 2,147,483,647. |
|
BIGINT |
An 8-byte signed integer with a range from -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807. |
|
FLOAT |
A 4-byte single-precision floating-point number. |
|
DOUBLE |
An 8-byte double-precision floating-point number. |
|
CHAR(n) |
A fixed-length string where n is the number of characters. The value of n ranges from 1 to Integer.MAX_VALUE, inclusive. |
|
STRING |
A variable-length string. |
|
DECIMAL(p, s) |
A decimal number with fixed precision and scale. Here, p is the total number of digits (precision), and s is the number of digits after the decimal point (scale). The value of p ranges from 1 to 38, inclusive. The value of s ranges from 0 to p, inclusive. |
|
DATE |
A date in the format |
|
TIME |
A time without time zone information, by default without fractional seconds. The format is |
|
TIME(p) |
A time without time zone information, where p is the number of fractional second digits (precision). The value of p ranges from 0 to 9, inclusive. The format is |
|
TIMESTAMP |
A timestamp without time zone information, by default with 6 fractional second digits. The format is |
|
TIMESTAMP(p) |
A timestamp without time zone information, where p is the number of fractional second digits (precision). The value of p ranges from 0 to 9, inclusive. The format is |
|
TIMESTAMP_LTZ |
A timestamp with local time zone, by default with 6 fractional second digits. The format is |
|
TIMESTAMP_LTZ(p) |
A timestamp with time zone, where p is the number of fractional second digits (precision). The value of p ranges from 0 to 9, inclusive. The format is |
|
BYTES |
A variable-length binary string (that is, a sequence of bytes). |
|
ARRAY<elementType> |
An ordered collection of elements of the same subtype. Unlike the SQL standard, you cannot specify a maximum length. The maximum capacity is fixed at 2,147,483,647. |
|
MAP<keyType,valueType > |
A collection of key-value pairs that maps keys to values. Keys must be unique. This type extends the SQL standard. |
|
ROW < [fieldName : fieldType [NOT NULL][COMMENT str][, …]] > |
A sequence of structured fields, where each field has a name, a type, and an optional description. Example: ROW<name STRING, age INT> |