2010YOUY01 commented on PR #27170: URL: https://github.com/apache/datafusion/pull/27170#issuecomment-6840721131
> After spending more time with this particular part of the code, I still think this is a good (but not the only) option for fixing the bug. `SortExec` can return, IMO, a wrong output ordering if `preserve_partitioning` is false until the optimizer changes the inner plan to return a single partition. During this window `COPY` / `DataSinkExec` obtains the output ordering and holds on to it. Thank you for the great investigation! I believe the ordering propagation is correct, changing it for the fix might make the implementation hard to reason about in the future. The issue is at the point `DataSinkExec` doing initial physical planning, the plan is wrong. I opened a PR for the alternative fix, see its description for rationale. It reused this PR's SLT test, and kept you as a co-author. - https://github.com/apache/datafusion/pull/27393 -- 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]
