Skip to content

Compound Types

Compound types include any type that is configurable including complex types as well as configurable scalar types.

Type Name Description Arrow Analog Iceberg Analog Spark Analog Trino Analog
FIXEDCHAR<L> A fixed-length field of length L. L can be between [1..2,147,483,647]. Values shorter than the length of the field are padded with spaces. - - CharType(L) CHAR(L)
VARCHAR<L> A field that can holds UTF-8-encoded strings between 0 and L in character length. The value of L can be between [1..2,147,483,647]. Values shorter than L are not padded. - - VarcharType(L) VARCHAR(L)
FIXEDBINARY<L> A binary field that is fixed in width to L bytes. Values that are shorter than L are 0-padded. FixedSizeBinary<L> FIXED<L> - -
DECIMAL<P, S> A fixed-precision decimal value having precision (P, number of digits) <= 38 and scale (S, number of fractional digits) 0 <= S <= P. Decimal<P, S, bitwidth=128> DECIMAL(P,S) DECIMAL(P,S) DECIMAL(P,S)
STRUCT<T1,…,T2> A list of types in a defined order. struct_<*> struct<*> struct<*> row<*>
NSTRUCT<N:T1,…,N:T2> Pseudo-type: A struct that maps unique names to value types. Each name is a UTF-8-encoded string. Each value can have a distinct type. Note that NSTRUCT is actually a pseudo-type. This is because Substrait’s core type system is based entirely on ordinal positions, not named fields. Nonetheless, when working with systems outside Substrait, names are important. struct_<*> struct<*> struct<*> row<*>
LIST<T> A list of values of type T. The list can be between [0..2,147,483,647] values in length. list list list array
MAP<K, V> An unordered list of type K keys with type V values. map<k,v> map<k,v> - map<k,v>