stevomitric opened a new pull request, #56187:
URL: https://github.com/apache/spark/pull/56187

   ### What changes were proposed in this pull request?
   
   Make `TimestampNanosVal` implement `Comparable<TimestampNanosVal>`, ordered 
lexicographically by `epochMicros` then `nanosWithinMicro`.
   
   This is the first of SPARK-57103 (ordering + compare + hash for nanosecond 
timestamp types). Follow-ups will 
   - wire `PhysicalDataType.ordering` for the two nanos physical types
   - extend the hash expressions (`hash`, `xxhash64`, `murmur3`).
   
   ### Why are the changes needed?
   
   `TimestampNanosVal` (added in SPARK-56981) is the physical value class for 
`TimestampNTZNanosType(p)` / `TimestampLTZNanosType(p)`. Without a `compareTo`, 
Catalyst cannot give it an `Ordering`, which blocks `ORDER BY`, sort-merge 
join, sort-based `GROUP BY`, `DISTINCT`, and any other operator that needs 
total order on the type.
   
   ### Does this PR introduce _any_ user-facing change?
   
   No.
   
   ### How was this patch tested?
   New UT in this PR.
   
   ### Was this patch authored or co-authored using generative AI tooling?
   
   Generated-by: Claude Code (Claude Opus 4.7)
   


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