public final class SelectJoinLogicalIRBuilder extends Object
JoinGraph (slices 167/168) rather than re-deriving a
relational plan from BoundProgram, which lacks join order,
predicate trees, and exact spans.
For each statement with a non-empty join graph it builds a left-deep
TableScan/Join tree: the right input of join n
is the newly added relation; the left input is the Join produced
by join n-1 (or the first TableScan for order 0).
Semantic spans map to SourceAnchors (line/col preserved; char
offsets unavailable from the semantic layer, set to -1).
V1 scope: join conditions are left null here — the Rex
predicate trees are attached in slice 176 (S15). A statement containing
an SemanticJoinType.UNSUPPORTED join is surfaced explicitly by
skipping its plan (never guessed); callers can detect the gap by the
absent plan for that statement index.
| Constructor and Description |
|---|
SelectJoinLogicalIRBuilder() |
| Modifier and Type | Method and Description |
|---|---|
LogicalProgram |
build(SemanticProgram semantic)
Build a
LogicalProgram from a semantic program: one
StatementPlan per statement whose join graph is non-empty
and fully supported. |
RelNode |
buildRelTree(JoinGraph jg)
Public for slice 176 reuse: build the left-deep rel tree for one graph.
|
public SelectJoinLogicalIRBuilder()
public LogicalProgram build(SemanticProgram semantic)
LogicalProgram from a semantic program: one
StatementPlan per statement whose join graph is non-empty
and fully supported.public RelNode buildRelTree(JoinGraph jg)