MaxGekk opened a new pull request #32196:
URL: https://github.com/apache/spark/pull/32196


   ### What changes were proposed in this pull request?
   Handle `YearMonthIntervalType` and `DayTimeIntervalType` in the `sql()` and 
`toString()` method of `Literal`, and format the ANSI interval in the ANSI 
style.
   
   ### Why are the changes needed?
   To improve readability and UX with Spark SQL. For example, a test output 
before the changes:
   ```
   -- !query
   select timestamp'2011-11-11 11:11:11' - interval '2' day
   -- !query schema
   struct<TIMESTAMP '2011-11-11 11:11:11' - 172800000000:timestamp>
   -- !query output
   2011-11-09 11:11:11
   ```
   
   ### Does this PR introduce _any_ user-facing change?
   Should not since the new intervals haven't been released yet.
   
   ### How was this patch tested?
   By running new tests:
   ```
   $ ./build/sbt "test:testOnly *LiteralExpressionSuite"
   ```


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

Reply via email to