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


   ### What changes were proposed in this pull request?
   1. Add new expression `DivideYMInterval` which multiplies a 
`YearMonthIntervalType` expression by a `NumericType` expression including 
ByteType, ShortType, IntegerType, LongType, FloatType, DoubleType, DecimalType.
   2. Extend binary arithmetic rules to support `year-month interval / numeric`.
   
   ### Why are the changes needed?
   To conform the ANSI SQL standard which requires such operation over 
year-month intervals:
   <img width="656" alt="Screenshot 2021-03-25 at 18 44 58" 
src="https://user-images.githubusercontent.com/1580697/112501559-68f07080-8d9a-11eb-8781-66e6631bb7ef.png";>
   
   ### Does this PR introduce _any_ user-facing change?
   No
   
   ### How was this patch tested?
   By running new tests:
   ```
   $ build/sbt "test:testOnly *IntervalExpressionsSuite"
   $ build/sbt "test:testOnly *ColumnExpressionSuite"
   ```


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