-
Notifications
You must be signed in to change notification settings - Fork 0
/
PhysicalPlan.scala
42 lines (37 loc) · 1018 Bytes
/
PhysicalPlan.scala
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
package core.planner.volcano.physicalplan
import core.execution.Operator
import core.planner.volcano.cost.Cost
sealed trait PhysicalPlan {
def operator(): Operator
def children(): Seq[PhysicalPlan]
def cost(): Cost
def estimations(): Estimations
def traits(): Set[String]
}
case class Scan(
operator: Operator,
cost: Cost,
estimations: Estimations,
traits: Set[String] = Set.empty
) extends PhysicalPlan {
override def children(): Seq[PhysicalPlan] = Seq.empty // scan do not receive any child
}
case class Project(
operator: Operator,
child: PhysicalPlan,
cost: Cost,
estimations: Estimations,
traits: Set[String] = Set.empty
) extends PhysicalPlan {
override def children(): Seq[PhysicalPlan] = Seq(child)
}
case class Join(
operator: Operator,
leftChild: PhysicalPlan,
rightChild: PhysicalPlan,
cost: Cost,
estimations: Estimations,
traits: Set[String] = Set.empty
) extends PhysicalPlan {
override def children(): Seq[PhysicalPlan] = Seq(leftChild, rightChild)
}