@@ -4,6 +4,7 @@ use crate::{
4
4
plan:: { partial_logical_plan:: PartialLogicalPlan , partial_physical_plan:: PartialPhysicalPlan } ,
5
5
} ;
6
6
7
+ #[ trait_variant:: make( Send ) ]
7
8
pub trait TransformationRule {
8
9
/// Checks if the transformation rule matches the current expression and its children.
9
10
/// Returns a vector of partially materialized logical plans.
@@ -15,8 +16,8 @@ pub trait TransformationRule {
15
16
/// expressions `e1 = Join(Join(A, B), C)` and `e2 = Join(A, Join(B, C))`.
16
17
///
17
18
/// If the rule wants to match against `Filter(Join(?L, ?R))`, then this function will partially
18
- /// materialize two expressions `Filter(e1)` and `Filter(e2)`. It is then up to the [`apply`]
19
- /// function to apply modifications to the partially materialized logical plans (for example, a
19
+ /// materialize two expressions `Filter(e1)` and `Filter(e2)`. It is then up to the memo table
20
+ /// API to apply modifications to the partially materialized logical plans (for example, a
20
21
/// filter pushdown under a `Join`).
21
22
///
22
23
/// TODO: Ideally this should return a `Stream` instead of a fully materialized Vector.
@@ -29,6 +30,7 @@ pub trait TransformationRule {
29
30
fn apply ( & self , expr : PartialLogicalPlan ) -> Vec < Expr > ;
30
31
}
31
32
33
+ #[ trait_variant:: make( Send ) ]
32
34
pub trait ImplementationRule {
33
35
/// Checks if the implementation rule matches the current expression and its children.
34
36
/// Returns a vector of partially materialized physical plans.
@@ -41,7 +43,7 @@ pub trait ImplementationRule {
41
43
///
42
44
/// If the rule wants to match against `Filter(HashJoin(?L, ?R))`, then this function will
43
45
/// partially materialize two expressions `Filter(e1)` and `Filter(e2)`. It is then up to the
44
- /// [`apply`] function to apply modifications to the partially materialized physical plans (for
46
+ /// memo table API to apply modifications to the partially materialized physical plans (for
45
47
/// example, a pushing a filter predicate into the condition of the `HashJoin`).
46
48
///
47
49
/// TODO: Ideally this should return a `Stream` instead of a fully materialized Vector.
0 commit comments