Expand description
Hamelin Translation Crate
This crate provides lowering from Hamelin’s type-checked AST to a lowered intermediate representation (IR) suitable for backend translation.
The IR enforces constraints that make backend translation simpler:
- No assignment to compound identifiers (all assignments use
SimpleIdentifier) - No
Rangetype or range operators - No high-level commands that can be expressed in terms of simpler ones
Re-exports§
pub use window_frame::RangeBound;pub use window_frame::RowBound;pub use window_frame::WindowFrame;
Modules§
- window_
frame - Window frame specification for WINDOW commands
Structs§
- IRAgg
Command - AGG command: aggregation with SimpleIdentifier-only assignments.
- IRAssignment
- Assignment to a simple identifier.
- IRCommand
- A lowered command with its output schema.
- IRExplode
Command - EXPLODE command: in-place array expansion.
- IRExpression
- A lowered expression - wrapper around TypedExpression.
- IRFrom
Command - FROM command: union of one or more inputs (tables or DEF references).
- IRJoin
Command - JOIN command: combines rows from two tables.
- IRLimit
Command - LIMIT command: row count.
- IRPipeline
- A lowered pipeline - a sequence of IR commands.
- IRPipeline
Def - A lowered tabular
DEF(DefBody::Pipeline). - IRSelect
Command - SELECT command: projections with SimpleIdentifier-only assignments.
- IRSort
Command - SORT command: ordering.
- IRSort
Expression - A sort expression with direction.
- IRStatement
- A lowered Hamelin statement with optional tabular
DEFpipelines (CTEs). - IRWhere
Command - WHERE command: filter predicate.
- IRWindow
Command - WINDOW command: window functions with SimpleIdentifier-only assignments.
- Normalization
Options - Options for normalizing and lowering a TypedStatement to IR.
Enums§
- IRCommand
Kind - The kind of IR command.
- IRInput
- An input source for FROM.
- IRSide
Effect - A lowered side effect for the statement.
- Join
Type - The type of join operation.
Functions§
- lower
- Lower a TypedStatement to IR with default options.
- normalize_
with - Create a NormalizationOptions builder for custom configuration.