- pyarrow.substrait.serialize_expressions(exprs, names, schema, *, allow_arrow_extensions=False)#
Serialize a collection of expressions into Substrait
Substrait expressions must be bound to a schema. For example, the Substrait expression
a:i32 + b:i32is different from the Substrait expression
a:i64 + b:i64. Pyarrow expressions are typically unbound. For example, both of the above expressions would be represented as
a + bin pyarrow.
This means a schema must be provided when serializing an expression. It also means that the serialization may fail if a matching function call cannot be found for the expression.
The expressions to serialize
Names for the expressions
The schema the expressions will be bound to
- allow_arrow_extensionsbool, default
If False then only functions that are part of the core Substrait function definitions will be allowed. Set this to True to allow pyarrow-specific functions and user defined functions but the result may not be accepted by other compute libraries.
An ExtendedExpression message containing the serialized expressions