MaxGekk opened a new pull request #26177: [SPARK-29520][SS] Fix checks of 
negative intervals
URL: https://github.com/apache/spark/pull/26177
 
 
   ### What changes were proposed in this pull request?
   - Added `getDuration()` to calculate interval duration in specified time 
units assuming provided days per months
   - Added `isNegative()` which return `true` is the interval duration is less 
than 0
   - Fix checking negative intervals by using `isNegative()` in structured 
streaming classes
   - Fix checking of `year-months` intervals
   
   ### Why are the changes needed?
   This fixes incorrect checking of negative intervals. An interval is negative 
when its duration is negative but not if interval's months **or** microseconds 
is negative. Also this fixes checking of `year-month` interval support because 
the `month` field could be negative.
   
   ### Does this PR introduce any user-facing change?
   Should not
   
   ### How was this patch tested?
   - Added tests for the `getDuration()` and `isNegative()` methods to 
`CalendarIntervalSuite`
   - By existing SS tests
   

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