Skip to main content

Crate hamelin_translation

Crate hamelin_translation 

Source
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 Range type 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§

IRAggCommand
AGG command: aggregation with SimpleIdentifier-only assignments.
IRAssignment
Assignment to a simple identifier.
IRCommand
A lowered command with its output schema.
IRExplodeCommand
EXPLODE command: in-place array expansion.
IRExpression
A lowered expression - wrapper around TypedExpression.
IRFromCommand
FROM command: union of one or more inputs (tables or DEF references).
IRJoinCommand
JOIN command: combines rows from two tables.
IRLimitCommand
LIMIT command: row count.
IRPipeline
A lowered pipeline - a sequence of IR commands.
IRPipelineDef
A lowered tabular DEF (DefBody::Pipeline).
IRSelectCommand
SELECT command: projections with SimpleIdentifier-only assignments.
IRSortCommand
SORT command: ordering.
IRSortExpression
A sort expression with direction.
IRStatement
A lowered Hamelin statement with optional tabular DEF pipelines (CTEs).
IRWhereCommand
WHERE command: filter predicate.
IRWindowCommand
WINDOW command: window functions with SimpleIdentifier-only assignments.
NormalizationOptions
Options for normalizing and lowering a TypedStatement to IR.

Enums§

IRCommandKind
The kind of IR command.
IRInput
An input source for FROM.
IRSideEffect
A lowered side effect for the statement.
JoinType
The type of join operation.

Functions§

lower
Lower a TypedStatement to IR with default options.
normalize_with
Create a NormalizationOptions builder for custom configuration.