Skip to main content

Module args

Module args 

Source
Expand description

Text-format data structures used by registered advanced extension handlers.

These types describe the arguments accepted by custom relation types, enhancements, and optimization hints. Relation extensions can additionally describe output columns.

The interface presented to extension handlers is structured rather than textual: handlers read and write values such as ExtensionArgs, Expr, and proto::Type. substrait-explain handles the surrounding parsing/textification. Some values need plan context before they reach a handler; for example, an expression argument like add($0, $1) is parsed using SimpleExtensions to resolve the text function name to the protobuf function anchor, and formatted by resolving that anchor back to a text name.

The extension-facing interface for Substrait objects (e.g. proto::Type) should map directly to Substrait protobuf concepts. Sometimes that means storing the protobuf type directly, as named output columns do with proto::Type; sometimes it means using a small wrapper, as expression-compatible arguments do with Expr around proto::Expression.

Untyped scalar literals (e.g. 2, 2.435, 'string') are kept as extension scalar values so text rendering can preserve scalar syntax even in verbose output, while handlers that accept expressions can still widen them into default Substrait literal expressions.

Structs§

ArgsExtractor
Helper struct for extracting named arguments with validation.
EnumValue
Helper for extracting the identifier from an ExtensionValue::Enum.
Expr
A Substrait expression carried as an extension argument or output column.
ExtensionArgs
Represents extension arguments plus optional output columns.
TupleValue
A tuple-valued extension argument.

Enums§

AddendumKind 🔒
Kind of relation addendum in the text format.
ExtensionColumn
Represents an output column specification.
ExtensionValue
Represents a value in extension arguments.
ExtensionValueKind
The variant kind of an ExtensionValue, used in diagnostics.

Functions§

invalid_type 🔒