Github user zhichao-li commented on a diff in the pull request:

    https://github.com/apache/spark/pull/6783#discussion_r34328421
  
    --- Diff: 
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/ArithmeticExpressionSuite.scala
 ---
    @@ -158,4 +157,18 @@ class ArithmeticExpressionSuite extends SparkFunSuite 
with ExpressionEvalHelper
         checkEvaluation(MinOf(Array(1.toByte, 2.toByte), Array(1.toByte, 
3.toByte)),
           Array(1.toByte, 2.toByte))
       }
    +
    +  test("pmod") {
    +    testNumericDataTypes { convert =>
    +      val left = Literal(convert(7))
    +      val right = Literal(convert(3))
    +      checkEvaluation(Pmod(left, right), convert(1))
    +      checkEvaluation(Pmod(Literal.create(null, left.dataType), right), 
null)
    +      checkEvaluation(Pmod(left, Literal.create(null, right.dataType)), 
null)
    +      checkEvaluation(Remainder(left, Literal(convert(0))), null)  // mod 
by 0
    +    }
    +    checkEvaluation(Pmod(-7, 3), 2)
    +    checkEvaluation(Pmod(7.2D, 4.1D), 3.1000000000000005)
    +    checkEvaluation(Pmod(Decimal(0.7), Decimal(0.2)), Decimal(0.1))
    --- End diff --
    
    `testNumericDataTypes ` has covered all of the numeric types and the other 
cover by the remain tests.


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