pepijnve commented on code in PR #16398:
URL: https://github.com/apache/datafusion/pull/16398#discussion_r2152793792
##########
datafusion/physical-plan/src/execution_plan.rs:
##########
@@ -912,25 +948,7 @@ impl PlanProperties {
/// 2. CoalescePartitionsExec for collapsing all of the partitions into
one without ordering guarantee
/// 3. SortPreservingMergeExec for collapsing all of the sorted partitions
into one with ordering guarantee
pub fn need_data_exchange(plan: Arc<dyn ExecutionPlan>) -> bool {
- if let Some(repartition) = plan.as_any().downcast_ref::<RepartitionExec>()
{
- !matches!(
- repartition.properties().output_partitioning(),
- Partitioning::RoundRobinBatch(_)
- )
- } else if let Some(coalesce) =
plan.as_any().downcast_ref::<CoalescePartitionsExec>()
- {
- coalesce.input().output_partitioning().partition_count() > 1
- } else if let Some(sort_preserving_merge) =
- plan.as_any().downcast_ref::<SortPreservingMergeExec>()
- {
- sort_preserving_merge
- .input()
- .output_partitioning()
- .partition_count()
- > 1
- } else {
- false
- }
+ plan.properties().evaluation_type == EvaluationType::Lazy
Review Comment:
Thanks for calling that line out. Should actually have been `== Eager`. I'll
fix that.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]