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

   ### What changes were proposed in this pull request?
   Tests-only follow-up to SPARK-57103, extending nanos coverage to 
`max_by`/`min_by` over `TIMESTAMP_NTZ(p)`/`TIMESTAMP_LTZ(p)` (`p` in `[7,9]`). 
No production change: `MaxMinby` gates only on the ordering's orderability 
(which nanos pass) and returns `valueExpr.dataType`, so a nanosecond value 
keeps its precision. Adds `ExpressionTypeCheckingSuite` contract asserts, 
`TimestampNanosFunctionsSuiteBase` E2E tests (value-is-nanos precision; 
sub-microsecond ordering on codegen + interpreted; NULL ordering; GROUP BY), 
and golden `max_by`/`min_by` queries in `timestamp-{ntz,ltz}-nanos.sql`. 
Two-arg form only; `k`-variant and mixed precision out of scope.
   
   ### Why are the changes needed?
   `max_by`/`min_by` over nanos had no coverage, especially the returned-value 
precision case. Locks in correct behavior and guards against regressions.
   
   ### Does this PR introduce any user-facing change?
   No. Tests only; types stay behind `spark.sql.timestampNanosTypes.enabled`.
   
   ### How was this patch tested?
   New tests on JDK 17: `ExpressionTypeCheckingSuite`, 
`TimestampNanosFunctionsAnsiOn/OffSuite`, and `SQLQueryTestSuite -z nanos` 
(goldens regenerated, then verified clean).
   
   ### Was this patch authored or co-authored using generative AI tooling?
   Generated-by: Claude Code (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