java.lang.Object
com.darkcollective.relix.ast.internal.Qualifiers

public final class Qualifiers extends Object
The relation names an expression's columns answer to as qualifiers.

A.x names the column x of relation A only where A is in scope, and which names are in scope is a property of the tree: a leaf brings its own name, and a ρ that renames the relation replaces every name beneath it. Both the planner (routing a join condition's references to a side) and the optimizer (deciding which input of a join a selection may be pushed into) ask this question, so it is answered once, here.

  • Method Details

    • inScope

      public static Set<String> inScope(RelNode node)
      Returns the relation names in scope as qualifiers for node's columns.

      A leaf relation answers to its own name. A ρ that gives a new relation name answers to that name only, shadowing everything beneath it; a column-only ρ leaves the names beneath it in scope. Every other operator answers to the names of all of its inputs.

      Parameters:
      node - the expression; must not be null
      Returns:
      the names, lowercased; a new mutable set