Module relations

Module relations 

Source

StructsΒ§

Column
NamedColumnList
ParsedNamedArgs
Extracts named arguments from pest pairs with duplicate detection and completeness checking.
RelationParsingContext
Parsing context for relations that includes extensions, registry, and optional warning collection
TableName
VirtualReadRel πŸ”’
Parsed Read:Virtual[rows => columns] relation. Needs a newtype because the proto type is ReadRel (same as NamedTable), but the grammar and handling are different.

TraitsΒ§

RelationParsePair
A trait for parsing relations with full context for tree building.

FunctionsΒ§

build_grouping_fields πŸ”’
Deduplicates expressions across all sets and produces the AggregateRel’s protobuf fields: a flat deduplicated expression list and per-set Grouping messages with index references into that list.
build_named_struct πŸ”’
Build a NamedStruct from parsed columns.
expect_one_child πŸ”’
This is a utility function for extracting a single child from the list of children, to be used in the RelationParsePair trait. The RelationParsePair trait passes a Vec of children, because some relations have multiple children - but most accept exactly one child.
i64_literal_expr πŸ”’
make_emit πŸ”’
Build an emit: Direct if the mapping is the identity [0, 1, ..., N-1] (where N = direct_output_count), otherwise Emit with the explicit mapping.
parse_aggregate_measures πŸ”’
Parses the output section of an aggregate (everything after =>).
parse_emit πŸ”’
Parse a reference list into an emit and output field count.
parse_expression_list πŸ”’
Grammar: expression_list = { expression ~ ("," ~ expression)* }
parse_grouping_set πŸ”’
Parses a single grouping set, e.g. ($0, $1) or _.
parse_grouping_sets πŸ”’
Parses the grouping section of an aggregate (everything before =>).
parse_output_mapping πŸ”’
Parse a reference list Pair and return an EmitKind::Emit. Parse a reference list into field indices for emit mapping.
parse_virtual_read_args πŸ”’
Read:Virtual positional args: either empty or a list of row tuples.
parse_virtual_row πŸ”’
Parse a single virtual_row ((expr, expr, ...) or ()) into a nested::Struct.