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

    https://github.com/apache/spark/pull/21367#discussion_r189723394
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/arithmetic.scala
 ---
    @@ -297,13 +279,39 @@ case class Divide(left: Expression, right: 
Expression) extends BinaryArithmetic
               if (${eval1.isNull}) {
                 ${ev.isNull} = true;
               } else {
    -            ${ev.value} = $divide;
    +            ${ev.value} = $operation;
               }
             }""")
         }
       }
     }
     
    +// scalastyle:off line.size.limit
    +@ExpressionDescription(
    +  usage = "expr1 _FUNC_ expr2 - Returns `expr1`/`expr2`. It always 
performs floating point division.",
    +  examples = """
    +    Examples:
    +      > SELECT 3 _FUNC_ 2;
    +       1.5
    +      > SELECT 2L _FUNC_ 2L;
    +       1.0
    +  """)
    +// scalastyle:on line.size.limit
    +case class Divide(left: Expression, right: Expression) extends DivModLike {
    +
    +  override def inputType: AbstractDataType = TypeCollection(DoubleType, 
DecimalType)
    +
    +  override def symbol: String = "/"
    +  override def decimalMethod: String = "$div"
    +  override def nullable: Boolean = true
    --- End diff --
    
    Oops! Thanks for catching it!
    Addressed in an update.


---

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

Reply via email to