MaxGekk opened a new pull request #26368: [SPARK-29723][SQL] Get date and time 
parts of an interval as java classes
URL: https://github.com/apache/spark/pull/26368
 
 
   ### What changes were proposed in this pull request?
   I propose 2 new methods for `CalendarInterval`:
   - `period()` returns the date part of an interval as an instance of 
`java.time.Period`
   - `duration()` returns the time part of an interval as an instance of 
`java.time.Duration`
   
   ### Why are the changes needed?
   Taking into account that `CalendarInterval` has been already partially 
exposed to users via the collect operation, and probably it will be fully 
exposed in the future, it could be convenient for users to get the date and 
time parts of intervals as java classes:
   - to avoid unnecessary dependency from Spark's classes in user code
   - to easily use external libraries that accept standard Java classes.
   
   ### Does this PR introduce any user-facing change?
   No
   
   ### How was this patch tested?
   By new test in `CalendarIntervalSuite`.
   

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


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to