2010YOUY01 commented on code in PR #18661:
URL: https://github.com/apache/datafusion/pull/18661#discussion_r2529652721
##########
datafusion/physical-optimizer/src/enforce_sorting/mod.rs:
##########
@@ -516,10 +516,7 @@ pub fn ensure_sorting(
);
child = update_sort_ctx_children_data(child, true)?;
}
- } else if physical_ordering.is_none()
- || !plan.maintains_input_order()[idx]
- || is_union(plan)
- {
+ } else if physical_ordering.is_none() ||
!plan.maintains_input_order()[idx] {
Review Comment:
> Wow. This is simple. I wonder why this `is_union` is here in the first
place 🤔
I guess when implementing optimizer rules, it’s more common to be
conservative than comprehensive if not sure, to avoid bugs.
--
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]