diff --git a/core/src/execution/datafusion/planner.rs b/core/src/execution/datafusion/planner.rs index 8d7d24654..40515c0c4 100644 --- a/core/src/execution/datafusion/planner.rs +++ b/core/src/execution/datafusion/planner.rs @@ -916,7 +916,7 @@ impl PhysicalPlanner { // the data corruption. Note that we only need to copy the input batch // if the child operator is `ScanExec`, because other operators after `ScanExec` // will create new arrays for the output batch. - let child = if child.as_any().downcast_ref::().is_some() { + let child = if child.as_any().is::() { Arc::new(CopyExec::new(child)) } else { child @@ -1609,10 +1609,10 @@ impl From for DataFusionError { /// modification. This is used to determine if we need to copy the input batch to avoid /// data corruption from reusing the input batch. fn can_reuse_input_batch(op: &Arc) -> bool { - op.as_any().downcast_ref::().is_some() - || op.as_any().downcast_ref::().is_some() - || op.as_any().downcast_ref::().is_some() - || op.as_any().downcast_ref::().is_some() + op.as_any().is::() + || op.as_any().is::() + || op.as_any().is::() + || op.as_any().is::() } /// Collects the indices of the columns in the input schema that are used in the expression