the-sakthi opened a new pull request, #50551: URL: https://github.com/apache/spark/pull/50551
### What changes were proposed in this pull request? - Extend the minute(...) function (MinutesOfTime) to handle TIME types of any precision from 0 to 6. - Add tests verifying that minute(...) works for all valid TIME precisions. ### Why are the changes needed? - Previously, minute(...) did not consistently support TIME type inputs with arbitrary precision. - Users need the minute function to handle TIME(0) through TIME(6). ### Does this PR introduce _any_ user-facing change? - Yes. Users can now call minute(...) on TIME(p) columns or literals with any valid precision. ### How was this patch tested? By running new tests: ``` $ build/sbt "test:testOnly *TimeExpressionsSuite.scala" ``` By manual tests: ``` scala> spark.sql("select minute(cast('12:30' as time(0)));").show() +------------------------------+ |minute(CAST(12:30 AS TIME(0)))| +------------------------------+ | 30| +------------------------------+ scala> spark.sql("select minute(cast('12:30' as time(2)));").show() +------------------------------+ |minute(CAST(12:30 AS TIME(2)))| +------------------------------+ | 30| +------------------------------+ scala> spark.sql("select minute(cast('12:30' as time(5)));").show() +------------------------------+ |minute(CAST(12:30 AS TIME(5)))| +------------------------------+ | 30| +------------------------------+ ``` ### Was this patch authored or co-authored using generative AI tooling? <!-- If generative AI tooling has been used in the process of authoring this patch, please include the phrase: 'Generated-by: ' followed by the name of the tool and its version. If no, write 'No'. Please refer to the [ASF Generative Tooling Guidance](https://www.apache.org/legal/generative-tooling.html) for details. --> -- 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: reviews-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org