Class ScopeAware<T extends Node>


  • public class ScopeAware<T extends Node>
    extends Object
    A wrapper for Expressions that can be used as a key in maps and sets.

    Expressions are considered equal if they are structurally equal and column references refer to the same logical fields.

    For example, given

    SELECT t.a, a FROM (VALUES 1) t(a)

    "t.a" and "a" are considered equal because they reference the same field of "t"

    Limitation: the expressions in the following query are currently not considered equal to each other, even though they refer to the same field from the same table or named query "t". This is because we currently don't assign identity to table references. (TODO: implement this)

    SELECT (SELECT t.a FROM t), (SELECT a FROM t)