Package org.apache.calcite.sql2rel
Class SqlToRelConverter.LookupContext
- java.lang.Object
-
- org.apache.calcite.sql2rel.SqlToRelConverter.LookupContext
-
- Enclosing class:
- SqlToRelConverter
private static class SqlToRelConverter.LookupContext extends java.lang.Object
Context to find a relational expression to a field offset.
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<Pair<RelNode,java.lang.Integer>>
relOffsetList
-
Constructor Summary
Constructors Constructor Description LookupContext(SqlToRelConverter.Blackboard bb, java.util.List<RelNode> rels, int systemFieldCount)
Creates a LookupContext with multiple input relational expressions.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) Pair<RelNode,java.lang.Integer>
findRel(int offset)
Returns the relational expression with a given offset, and the ordinal in the combined row of its first field.
-
-
-
Constructor Detail
-
LookupContext
LookupContext(SqlToRelConverter.Blackboard bb, java.util.List<RelNode> rels, int systemFieldCount)
Creates a LookupContext with multiple input relational expressions.- Parameters:
bb
- Context for translating this sub-queryrels
- Relational expressionssystemFieldCount
- Number of system fields
-
-
Method Detail
-
findRel
Pair<RelNode,java.lang.Integer> findRel(int offset)
Returns the relational expression with a given offset, and the ordinal in the combined row of its first field.For example, in
Emp JOIN Dept
, findRel(1) returns the relational expression forDept
and offset 6 (becauseEmp
has 6 fields, therefore the first field ofDept
is field 6.- Parameters:
offset
- Offset of relational expression in FROM clause- Returns:
- Relational expression and the ordinal of its first field
-
-