cloud-fan commented on PR #52474:
URL: https://github.com/apache/spark/pull/52474#issuecomment-3383971418

   just back from the holiday. I think a new constant SortOrder is too much, as 
it complicates the foundemental ordering framework.
   
   I agree that we need to propogate the constant information so that we can 
know if an attribute is a constant or not. The rule `FoldablePropagation` does 
it already but it does not propagate the constant info to the v1 write commands.
   
   A straightforward fix: in the rule `V1Write`, we calculate the 
`requiredOrdering` more accurately, by creating a fake `Sort` node with the 
input query, and invoke the rule `FoldablePropagation` to optimize the sort 
ordering expressions.


-- 
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]

Reply via email to