Package io.prestosql.sql.planner
Class ScopeAware<T extends Node>
- java.lang.Object
-
- io.prestosql.sql.planner.ScopeAware<T>
-
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)
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
T
getNode()
int
hashCode()
static <T extends Node>
ScopeAware<T>scopeAwareKey(T node, Analysis analysis, Scope scope)
String
toString()
-
-
-
Method Detail
-
scopeAwareKey
public static <T extends Node> ScopeAware<T> scopeAwareKey(T node, Analysis analysis, Scope scope)
-
getNode
public T getNode()
-
-