Class JoinScope

All Implemented Interfaces:

public class JoinScope extends ListScope
The name-resolution context for expression inside a JOIN clause. The objects visible are the joined table expressions, and those inherited from the parent scope.

Consider "SELECT * FROM (A JOIN B ON {exp1}) JOIN C ON {exp2}". {exp1} is resolved in the join scope for "A JOIN B", which contains A and B but not C.

  • Method Details

    • getNode

      public SqlNode getNode()
      Description copied from interface: SqlValidatorScope
      Returns the root node of this scope. Never null.
    • addChild

      public void addChild(SqlValidatorNamespace ns, String alias, boolean nullable)
      Description copied from interface: SqlValidatorScope
      Registers a relation in this scope.
      Specified by:
      addChild in interface SqlValidatorScope
      addChild in class ListScope
      ns - Namespace representing the result-columns of the relation
      alias - Alias with which to reference the relation, must not be null
      nullable - Whether this is a null-generating side of a join
    • lookupWindow

      public @Nullable SqlWindow lookupWindow(String name)
      Description copied from interface: SqlValidatorScope
      Finds a window with a given name. Returns null if not found.
      Specified by:
      lookupWindow in interface SqlValidatorScope
      lookupWindow in class DelegatingScope
    • getUsingScope

      public @Nullable SqlValidatorScope getUsingScope()
      Returns the scope which is used for resolving USING clause.
    • isWithin

      public boolean isWithin(SqlValidatorScope scope2)
      Description copied from interface: SqlValidatorScope
      Returns whether this scope is enclosed within scope2 in such a way that it can see the contents of scope2.