MaxGekk opened a new pull request #32056: URL: https://github.com/apache/spark/pull/32056
### What changes were proposed in this pull request? 1. Added new method `toYMIntervalString()` to `IntervalUtils` which converts an year-month interval as a number of month to a string in the form **"interval '[sign]yearField-monthField' year to month"**. 2. Extended the `Cast` expression to support casting of `YearMonthIntervalType` to `StringType`. ### Why are the changes needed? To conform the ANSI SQL standard which requires to support such casting. ### Does this PR introduce _any_ user-facing change? Should not because new year-month interval has not been released yet. ### How was this patch tested? Added new tests for casting: ``` $ build/sbt "testOnly *CastSuite*" ``` -- 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. For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
