Substrait tries to cover the most common types used in data manipulation. Types beyond this common core may be represented using simple extensions.
Substrait types fundamentally consist of four components:
|Class||Always|| ||Together with the parameter pack, describes the set of non-null values supported by the type. Subdivided into simple and compound type classes.|
|Nullability||Always||Either ||Describes whether values of this type can be null. Note that null is considered to be a special value of a nullable type, rather than the only value of a special null type.|
|Variation||Always||No suffix or explicitly ||Allows different variations of the same type class to exist in a system at a time, usually distinguished by in-memory format.|
|Parameters||Compound types only|| ||Some combination of zero or more data types or integers. The expected set of parameters and the significance of each parameter depends on the type class.|
Refer to Type Parsing for a description of the syntax used to describe types.
Note that Substrait employs a strict type system without any coercion rules. All changes in types must be made explicit via cast expressions.