yadavay-amzn opened a new pull request, #56934:
URL: https://github.com/apache/spark/pull/56934

   ### What changes were proposed in this pull request?
   
   Adds `TimeType` to the input types accepted by the 
`approx_count_distinct_for_intervals` aggregate. TIME values are bucketed by 
their internal nanosecond-of-day `Long` representation, routed through the same 
`Long -> Double` path already used for `TimestampType` / `DayTimeIntervalType`.
   
   ### Why are the changes needed?
   
   `approx_count_distinct_for_intervals` accepts 
numeric/date/timestamp/interval endpoints but rejected TIME at analysis time. 
TIME has a natural numeric (nanosecond-of-day) ordering, so it can be bucketed 
like the other temporal types.
   
   ### Does this PR introduce _any_ user-facing change?
   
   Yes - `approx_count_distinct_for_intervals` now accepts TIME columns and 
endpoints.
   
   ### How was this patch tested?
   
   Extended `ApproxCountDistinctForIntervalsSuite` with TIME endpoints 
asserting the per-interval approximate distinct counts; the error-message 
expectations were updated to include TIME.
   
   ### Was this patch authored or co-authored using generative AI tooling?
   
   Authored with assistance by Claude Opus 4.8.
   


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