MaxGekk opened a new pull request #31614: URL: https://github.com/apache/spark/pull/31614
### What changes were proposed in this pull request? In the PR, I propose to extend Catalyst's type system by two new types that conform to the SQL standard (see SQL:2016, section 4.6.3): - `DayTimeIntervalType` represents the day-time interval type, - `YearMonthIntervalType` for SQL year-month interval type. ### Why are the changes needed? Spark as it is today supports an INTERVAL datatype. However this type is of very limited use. Existing interval values cannot be compared with any other interval values, or persisted to storage. Spark users request to either implement new or expand existing built-in functions which produce some sort of measures for elapsed time, such as `DATEDIFF()`. Rather than work around the edges to fill the potholes of the existing INTERVAL data type, I would like to propose to deliver a proper ANSI compliant INTERVAL type that can be introduced with minimal incompatibility, is comparable and thus sortable, and can be persisted in tables. ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? 1. By checking coding style via: ``` $ ./dev/scalastyle $ ./dev/lint-java ``` 2. Run the test for the default sizes: ``` $ build/sbt "test:testOnly *DataTypeSuite" ``` ---------------------------------------------------------------- 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]
