ozankabak commented on code in PR #9346: URL: https://github.com/apache/arrow-datafusion/pull/9346#discussion_r1503576120
########## datafusion/core/tests/user_defined/user_defined_plan.rs: ########## @@ -91,6 +91,7 @@ use datafusion::{ }; use async_trait::async_trait; +use datafusion_physical_expr::EquivalenceProperties; Review Comment: Let's move this up next to other DataFusion imports ########## datafusion/physical-plan/src/joins/hash_join.rs: ########## @@ -65,6 +65,7 @@ use datafusion_execution::TaskContext; use datafusion_physical_expr::equivalence::join_equivalence_properties; use datafusion_physical_expr::PhysicalExprRef; +use crate::joins::utils::JoinOnRef; Review Comment: Let's move this next to other relative (`crate`) imports ########## datafusion/physical-plan/src/filter.rs: ########## @@ -115,32 +115,76 @@ impl FilterExec { self.default_selectivity } - fn with_cache(mut self) -> Self { + fn statistics_helper( Review Comment: Let's write a docstring for this function. ########## datafusion/physical-plan/src/repartition/mod.rs: ########## @@ -611,27 +607,49 @@ impl RepartitionExec { abort_helper: Arc::new(AbortOnDropMany::<()>(vec![])), })), metrics: ExecutionPlanMetricsSet::new(), - preserve_order: false, + preserve_order, cache, + }) + } + + fn maintains_input_order_helper( + input: &Arc<dyn ExecutionPlan>, + preserve_order: bool, + ) -> Vec<bool> { + if preserve_order { + vec![true] + } else { + // We preserve ordering when input partitioning is 1 + vec![input.output_partitioning().partition_count() <= 1] } Review Comment: Why not write it as `vec![preserve_order || input.output_partitioning().partition_count() <= 1]` ########## datafusion/core/src/test_util/mod.rs: ########## @@ -55,6 +55,7 @@ use tempfile::TempDir; #[cfg(feature = "parquet")] pub use datafusion_common::test_util::parquet_test_data; pub use datafusion_common::test_util::{arrow_test_data, get_data_dir}; +use datafusion_physical_expr::EquivalenceProperties; Review Comment: Let's move this import statement up so it doesn't get mixed up with the backwards compatibility imports. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org