Package org.apache.calcite.sql2rel
Class RelDecorrelator.CorelMap
java.lang.Object
org.apache.calcite.sql2rel.RelDecorrelator.CorelMap
- Enclosing class:
- RelDecorrelator
A map of the locations of
Correlate in a tree of RelNodes.
It is used to drive the decorrelation process. Treat it as immutable; rebuild if you modify the tree.
There are three maps:
mapRefRelToCorRefmaps aRelNodeto the correlated variables it references;mapCorToCorRelmaps a correlated variable to theCorrelateproviding it;mapFieldAccessToCorRefmaps a rex field access to the corVar it represents. Because typeFlattener does not clone or modify a correlated field access this map does not need to be updated.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanNavigableMap<org.apache.calcite.rel.core.CorrelationId,org.apache.calcite.rel.RelNode> booleanReturns whether there are any correlating variables in this statement.inthashCode()static RelDecorrelator.CorelMapof(com.google.common.collect.SortedSetMultimap<org.apache.calcite.rel.RelNode, org.apache.calcite.sql2rel.RelDecorrelator.CorRef> mapRefRelToCorVar, NavigableMap<org.apache.calcite.rel.core.CorrelationId, org.apache.calcite.rel.RelNode> mapCorToCorRel, Map<RexFieldAccess, org.apache.calcite.sql2rel.RelDecorrelator.CorRef> mapFieldAccessToCorVar) Creates a CorelMap with given contents.toString()
-
Method Details
-
toString
-
equals
-
hashCode
public int hashCode() -
getMapCorToCorRel
public NavigableMap<org.apache.calcite.rel.core.CorrelationId,org.apache.calcite.rel.RelNode> getMapCorToCorRel() -
hasCorrelation
public boolean hasCorrelation()Returns whether there are any correlating variables in this statement.- Returns:
- whether there are any correlating variables
-