Class 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  
    • 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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • relOffsetList

        private final java.util.List<Pair<RelNode,​java.lang.Integer>> relOffsetList
    • 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-query
        rels - Relational expressions
        systemFieldCount - 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 for Dept and offset 6 (because Emp has 6 fields, therefore the first field of Dept is field 6.

        Parameters:
        offset - Offset of relational expression in FROM clause
        Returns:
        Relational expression and the ordinal of its first field