All types
Reference catalog of FeatureQL types and how to write a literal for each. For the mental model and casting, start with Types . For validation rules and NULL/EMPTY, see Literals .
Data types
| Category | Type | Example literal |
|---|---|---|
| Integer | BIGINTalias INT64 | 1 or BIGINT '1' |
INTaliases INT32, INTEGER | INT '1' | |
SMALLINTalias INT16 | SMALLINT '1' | |
TINYINTalias INT8 | TINYINT '1' | |
| Decimal | DECIMAL / DECIMAL(p,s)default DECIMAL → DECIMAL(18,6) | 1.0 or DECIMAL '1.23' |
| Floating point | FLOATalias FLOAT32 | FLOAT '1.1' |
DOUBLEalias FLOAT64 | 1.1e0 or DOUBLE '1.1' | |
| String | VARCHARalias STRING | 'hello' |
| Boolean | BOOLEANalias BOOL | TRUE / FALSE |
| Temporal | TIMESTAMP / TIMESTAMP(p)default precision 3 | TIMESTAMP '2024-10-15 10:04:00' |
TIMESTAMPTZ / TIMESTAMPTZ(p)default precision 3 | TIMESTAMPTZ '2024-10-15 10:04:00' | |
DATE | DATE '2024-10-15' | |
INTERVAL | INTERVAL '1 DAY' | |
| Document | JSON | JSON '{"a": 1}' |
| Binary | BITSTRING | BITSTRING '1010' |
BINARY | X'0102' or BINARY '0102' | |
| Geometry | GEOM_POINT | GEOM_POINT 'POINT(0 0)' |
GEOM_LINESTRING | GEOM_LINESTRING 'LINESTRING(0 0, 1 1)' | |
GEOM_POLYGON | GEOM_POLYGON 'POLYGON((0 0, 1 0, 1 1, 0 0))' | |
GEOM_MULTIPOINT | GEOM_MULTIPOINT 'MULTIPOINT((0 0), (1 1))' | |
GEOM_MULTILINESTRING | GEOM_MULTILINESTRING 'MULTILINESTRING((0 0, 1 1))' | |
GEOM_MULTIPOLYGON | GEOM_MULTIPOLYGON 'MULTIPOLYGON(((0 0, 1 0, 1 1, 0 0)))' | |
GEOM_MULTIANY | GEOM_MULTIANY 'POINT(0 0)' | |
| Geography | GEOG_POINT | GEOG_POINT 'POINT(-122.4 37.8)' |
GEOG_LINESTRING | GEOG_LINESTRING 'LINESTRING(0 0, 1 1)' | |
GEOG_POLYGON | GEOG_POLYGON 'POLYGON((0 0, 1 0, 1 1, 0 0))' | |
GEOG_MULTIPOINT | GEOG_MULTIPOINT 'MULTIPOINT((0 0), (1 1))' | |
GEOG_MULTILINESTRING | GEOG_MULTILINESTRING 'MULTILINESTRING((0 0, 1 1))' | |
GEOG_MULTIPOLYGON | GEOG_MULTIPOLYGON 'MULTIPOLYGON(((0 0, 1 0, 1 1, 0 0)))' | |
GEOG_MULTIANY | GEOG_MULTIANY 'POINT(0 0)' | |
| Complex | ARRAY / ARRAY(T)alias LIST | ARRAY[1, 2, 3] |
ROW / ROW(…)alias STRUCT | ROW(1 AS id, 'A' AS name) |
Use the subtype keyword for geospatial literals (GEOM_POINT, …). Bare GEOM '…' / GEOG '…' are not valid syntax. Constructors such as ST_GEOMPOINT() are alternatives — see All functions .
ARRAY(ROW(…)) is a common pattern — see Array of Rows .
Names that look like types but are not usable as values
| Name | What happens |
|---|---|
HUGEINT | Rejected (UE/HUGEINT-NOT-SUPPORTED). Use BIGINT. |
INT128 | Rejected (UE/INT128-NOT-SUPPORTED). Use BIGINT. |
MAP | Not supported. Use ARRAY(ROW(…)) with an INDEX. |
EMPTY | Marker for optional function parameters — not a column/value type. |
UNSPECIFIED | Type of bare NULL before it is typed — not a cast or INPUT() target. Prefer NULL(concrete_type). |
Backend availability
Not available on Trino: BITSTRING literals.
Not available on Serving: BITSTRING literals, BINARY / X'…' literals, and GEOM_* / GEOG_* WKT literals.
TYPEOF(X'0102') and TYPEOF(GEOM_POINT '…') still work on every backend — the type is resolved at compile time without emitting the payload.
Meta literal types
These appear in function parameters and metaprogramming, not as ordinary column values:
| Type | Example literal |
|---|---|
FEATURE | FEATURE 'feature_name' |
FIELD | FIELD 'field_name' |
TYPE | TYPE 'type_name' |