MaxGekk commented on a change in pull request #31789:
URL: https://github.com/apache/spark/pull/31789#discussion_r591118022
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/arithmetic.scala
##########
@@ -173,6 +180,11 @@ abstract class BinaryArithmetic extends BinaryOperator
with NullIntolerant {
def calendarIntervalMethod: String =
sys.error("BinaryArithmetics must override either calendarIntervalMethod
or genCode")
+ /** Name of the function for this expression on [[DayTimeIntervalType]] and
+ * [[YearMonthIntervalType]] types. */
+ def intervalMethod: String =
Review comment:
Sure, since `exactMathMethod` is always defined in the expressions, we
can directly invoke `exactMathMethod.get`. Though I can add a guard `if
exactMathMethod.isDefined`.
----------------------------------------------------------------
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]