Package org.apache.calcite.materialize
Class Step
- java.lang.Object
-
- org.apache.calcite.util.graph.DefaultEdge
-
- org.apache.calcite.materialize.Step
-
class Step extends DefaultEdge
Edge in the join graph.It is directed: the "parent" must be the "many" side containing the foreign key, and the "target" is the "one" side containing the primary key. For example, EMP → DEPT.
When created via
LatticeSpace.addEdge(LatticeTable, LatticeTable, List)
it is unique within theLatticeSpace
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static class
Step.Factory
CreatesStep
instances.
-
Field Summary
Fields Modifier and Type Field Description (package private) java.util.List<IntPair>
keys
-
Fields inherited from class org.apache.calcite.util.graph.DefaultEdge
source, target
-
-
Constructor Summary
Constructors Constructor Description Step(LatticeTable source, LatticeTable target, java.util.List<IntPair> keys)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private double
cardinality(SqlStatisticProvider statisticProvider, LatticeTable table)
Temporary method.boolean
equals(java.lang.Object obj)
int
hashCode()
(package private) boolean
isBackwards(SqlStatisticProvider statisticProvider)
(package private) LatticeTable
source()
(package private) LatticeTable
target()
java.lang.String
toString()
-
Methods inherited from class org.apache.calcite.util.graph.DefaultEdge
factory
-
-
-
-
Field Detail
-
keys
final java.util.List<IntPair> keys
-
-
Constructor Detail
-
Step
Step(LatticeTable source, LatticeTable target, java.util.List<IntPair> keys)
-
-
Method Detail
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classDefaultEdge
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classDefaultEdge
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
source
LatticeTable source()
-
target
LatticeTable target()
-
isBackwards
boolean isBackwards(SqlStatisticProvider statisticProvider)
-
cardinality
private double cardinality(SqlStatisticProvider statisticProvider, LatticeTable table)
Temporary method. We should use (inferred) primary keys to figure out the direction of steps.
-
-