Github user gatorsmile commented on a diff in the pull request:

    https://github.com/apache/spark/pull/21005#discussion_r179967381
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/arithmetic.scala
 ---
    @@ -117,16 +117,22 @@ abstract class BinaryArithmetic extends 
BinaryOperator with NullIntolerant {
     
       override def dataType: DataType = left.dataType
     
    -  override lazy val resolved = childrenResolved && 
checkInputDataTypes().isSuccess
    +  override lazy val resolved: Boolean = childrenResolved && 
checkInputDataTypes().isSuccess
     
       /** Name of the function for this expression on a [[Decimal]] type. */
       def decimalMethod: String =
         sys.error("BinaryArithmetics must override either decimalMethod or 
genCode")
     
    +  /** Name of the function for this expression on a [[CalendarInterval]] 
type. */
    +  def calendarIntervalMethod: String =
    +    sys.error("BinaryArithmetics must override either 
calendarIntervalMethod or genCode")
    +
       override def doGenCode(ctx: CodegenContext, ev: ExprCode): ExprCode = 
dataType match {
    -    case dt: DecimalType =>
    +    case _: DecimalType =>
           defineCodeGen(ctx, ev, (eval1, eval2) => 
s"$eval1.$decimalMethod($eval2)")
         // byte and short are casted into int when add, minus, times or divide
    --- End diff --
    
    move this comment to 136?


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to