pyarrow.substrait.serialize_expressions#
- 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:i32
is different from the Substrait expressiona:i64 + b:i64
. Pyarrow expressions are typically unbound. For example, both of the above expressions would be represented asa + b
in 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.
- Parameters:
- exprs
list
ofExpression
The expressions to serialize
- names
list
ofstr
Names for the expressions
- schema
Schema
The schema the expressions will be bound to
- allow_arrow_extensionsbool, default
False
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.
- exprs
- Returns:
Buffer
An ExtendedExpression message containing the serialized expressions