EnricoMi commented on PR #38356:
URL: https://github.com/apache/spark/pull/38356#issuecomment-1297042658

   But `val outputOrdering = query.outputOrdering`, `empty2NullPlan` is not 
involved in `outputOrdering`:
   
   
https://github.com/apache/spark/blob/ff66adda3ca3762b8c71b14acbd6da00c5508a2e/sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/V1Writes.scala#L85
   
   However, `requiredOrdering` incorporates `empty2NullPlan.output`:
   
https://github.com/apache/spark/blob/ff66adda3ca3762b8c71b14acbd6da00c5508a2e/sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/V1Writes.scala#L81-L84
   
   I think that should simply read:
   ```
   val requiredOrdering = write.requiredOrdering
   ```
   


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