Skip to content

Commit 88233aa

Browse files
committed
rename SharedError
1 parent f1c34af commit 88233aa

File tree

4 files changed

+9
-8
lines changed

4 files changed

+9
-8
lines changed

datafusion/common/src/error.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ pub enum DataFusionError {
139139

140140
/// Errors for wrapping other errors.
141141
/// This is useful when we need to share DatafusionError.
142-
WrappedError(Arc<DataFusionError>),
142+
SharedError(Arc<DataFusionError>),
143143
}
144144

145145
#[macro_export]
@@ -347,7 +347,7 @@ impl Error for DataFusionError {
347347
DataFusionError::Context(_, e) => Some(e.as_ref()),
348348
DataFusionError::Substrait(_) => None,
349349
DataFusionError::Diagnostic(_, e) => Some(e.as_ref()),
350-
DataFusionError::WrappedError(e) => Some(e.as_ref()),
350+
DataFusionError::SharedError(e) => Some(e.as_ref()),
351351
}
352352
}
353353
}
@@ -462,7 +462,7 @@ impl DataFusionError {
462462
DataFusionError::Context(_, _) => "",
463463
DataFusionError::Substrait(_) => "Substrait error: ",
464464
DataFusionError::Diagnostic(_, _) => "",
465-
DataFusionError::WrappedError(_) => "",
465+
DataFusionError::SharedError(_) => "",
466466
}
467467
}
468468

@@ -504,7 +504,7 @@ impl DataFusionError {
504504
}
505505
DataFusionError::Substrait(ref desc) => Cow::Owned(desc.to_string()),
506506
DataFusionError::Diagnostic(_, ref err) => Cow::Owned(err.to_string()),
507-
DataFusionError::WrappedError(ref desc) => Cow::Owned(desc.to_string()),
507+
DataFusionError::SharedError(ref desc) => Cow::Owned(desc.to_string()),
508508
}
509509
}
510510

datafusion/optimizer/src/eliminate_cross_join.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ impl OptimizerRule for EliminateCrossJoin {
8585
plan: LogicalPlan,
8686
config: &dyn OptimizerConfig,
8787
) -> Result<Transformed<LogicalPlan>> {
88+
// todo - explicit schema recompute
8889
let plan_schema = Arc::clone(plan.schema());
8990
let mut possible_join_keys = JoinKeySet::new();
9091
let mut all_inputs: Vec<LogicalPlan> = vec![];
@@ -204,7 +205,7 @@ fn rewrite_children(
204205

205206
// recompute schema if the plan was transformed
206207
if transformed_plan.transformed {
207-
transformed_plan.map_data(|plan| plan.recompute_schema())
208+
transformed_plan.map_data(|plan| plan.recompute_schema())// todo - explicit schema recompute
208209
} else {
209210
Ok(transformed_plan)
210211
}

datafusion/physical-plan/src/joins/utils.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1076,7 +1076,7 @@ impl<T: 'static> OnceFut<T> {
10761076
OnceFutState::Ready(r) => Poll::Ready(
10771077
r.as_ref()
10781078
.map(|r| r.as_ref())
1079-
.map_err(|e| DataFusionError::WrappedError(Arc::clone(e))),
1079+
.map_err(|e| DataFusionError::SharedError(Arc::clone(e))),
10801080
),
10811081
}
10821082
}
@@ -1091,7 +1091,7 @@ impl<T: 'static> OnceFut<T> {
10911091
match &self.state {
10921092
OnceFutState::Pending(_) => unreachable!(),
10931093
OnceFutState::Ready(r) => {
1094-
Poll::Ready(r.clone().map_err(DataFusionError::WrappedError))
1094+
Poll::Ready(r.clone().map_err(DataFusionError::SharedError))
10951095
}
10961096
}
10971097
}

datafusion/physical-plan/src/repartition/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -916,7 +916,7 @@ impl RepartitionExec {
916916

917917
for (_, tx) in txs {
918918
// wrap it because need to send error to all output partitions
919-
let err = Err(DataFusionError::WrappedError(Arc::clone(&e)));
919+
let err = Err(DataFusionError::SharedError(Arc::clone(&e)));
920920
tx.send(Some(err)).await.ok();
921921
}
922922
}

0 commit comments

Comments
 (0)