Skip to content

Commit 2f9d4d8

Browse files
committed
remove Option form the context parameter in cost model interface
1 parent ddcff96 commit 2f9d4d8

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

optd-cost-model/src/cost_model.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ impl<S: CostModelStorageLayer + std::marker::Sync + 'static> CostModel for CostM
4141
node: &PhysicalNodeType,
4242
predicates: &[ArcPredicateNode],
4343
children_stats: &[Option<&EstimatedStatistic>],
44-
context: Option<ComputeCostContext>,
44+
context: ComputeCostContext,
4545
) -> CostModelResult<Cost> {
4646
todo!()
4747
}
@@ -51,7 +51,7 @@ impl<S: CostModelStorageLayer + std::marker::Sync + 'static> CostModel for CostM
5151
node: PhysicalNodeType,
5252
predicates: &[ArcPredicateNode],
5353
children_statistics: &[Option<&EstimatedStatistic>],
54-
context: Option<ComputeCostContext>,
54+
context: ComputeCostContext,
5555
) -> CostModelResult<EstimatedStatistic> {
5656
todo!()
5757
}

optd-cost-model/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ pub trait CostModel: 'static + Send + Sync {
6565
node: &PhysicalNodeType,
6666
predicates: &[ArcPredicateNode],
6767
children_stats: &[Option<&EstimatedStatistic>],
68-
context: Option<ComputeCostContext>,
68+
context: ComputeCostContext,
6969
) -> CostModelResult<Cost>;
7070

7171
/// TODO: documentation
@@ -78,7 +78,7 @@ pub trait CostModel: 'static + Send + Sync {
7878
node: PhysicalNodeType,
7979
predicates: &[ArcPredicateNode],
8080
children_statistics: &[Option<&EstimatedStatistic>],
81-
context: Option<ComputeCostContext>,
81+
context: ComputeCostContext,
8282
) -> CostModelResult<EstimatedStatistic>;
8383

8484
/// TODO: documentation

0 commit comments

Comments
 (0)