EnricoMi commented on PR #38356: URL: https://github.com/apache/spark/pull/38356#issuecomment-1296807474
> We should use the original plan to get the output ordering directly. Projection does not modify `outputOrdering`, in fact `Project extends OrderPreservingUnaryNode`: https://github.com/apache/spark/blob/90d31541fb0313d762cc36067060e6445c04a9b6/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/LogicalPlan.scala#L208-L210 So `Project(projection, plan).outputOrdering` is already identical to `plan.outputOrdering`, as suggested. -- 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]
