Data Types
These data types are used to represent data across all tables in Sundial. All functions are also defined on top of these data types
Data Type | Definition | Example |
---|---|---|
Integer | A 32-bit signed integer. | 42 |
Long | A 64-bit signed integer. | 1.2346E+14 |
Float | A single-precision 32-bit IEEE 754 floating point. | 3.14 |
Double | A double-precision 64-bit IEEE 754 floating point. | 2.71828183 |
Decimal | A fixed-point number with user-defined precision and scale. | DECIMAL '123.45' |
String | A variable-length character string. | 'Hello, World!' |
Binary | A variable-length binary data. | X'1F2E3D' |
Boolean | A true or false value. | TRUE |
Date | A calendar date (year, month, day). | DATE '2023-10-05' |
DateTime | A date and time without a time zone. | TIMESTAMP '2023-10-05 12:34' |
Null | Represents a missing or undefined value. | NULL |
DayTimeInterval | An interval of days, hours, minutes, and seconds. | INTERVAL '2' DAY |
Map<K, V> | A collection of key-value pairs. | MAP(ARRAY['a'], ARRAY[1]) |
Array<V> | An ordered collection of elements. | ARRAY[1, 2, 3] |
Array<NullType> | Empty collection of elements of any type. | ARRAY() |
Struct | A complex type with named fields. | ROW(1, 'a', TRUE) |