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

    https://github.com/apache/spark/pull/14036#discussion_r70660136
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/arithmetic.scala
 ---
    @@ -207,20 +207,12 @@ case class Multiply(left: Expression, right: 
Expression)
       protected override def nullSafeEval(input1: Any, input2: Any): Any = 
numeric.times(input1, input2)
     }
     
    -@ExpressionDescription(
    -  usage = "a _FUNC_ b - Divides a by b.",
    -  extended = "> SELECT 3 _FUNC_ 2;\n 1.5")
    -case class Divide(left: Expression, right: Expression)
    -    extends BinaryArithmetic with NullIntolerant {
    -
    -  override def inputType: AbstractDataType = TypeCollection(DoubleType, 
DecimalType)
    -
    -  override def symbol: String = "/"
    -  override def decimalMethod: String = "$div"
    +abstract class DivideBase extends BinaryArithmetic with NullIntolerant {
       override def nullable: Boolean = true
     
       private lazy val div: (Any, Any) => Any = dataType match {
         case ft: FractionalType => 
ft.fractional.asInstanceOf[Fractional[Any]].div
    +    case i: IntegralType => i.integral.asInstanceOf[Integral[Any]].quot
    --- End diff --
    
    @cloud-fan how about make this line in IntegralDivide that can be more 
readable?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to