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

    https://github.com/apache/spark/pull/17056#discussion_r103097875
  
    --- Diff: 
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/HashExpressionsSuite.scala
 ---
    @@ -371,6 +370,48 @@ class HashExpressionsSuite extends SparkFunSuite with 
ExpressionEvalHelper {
             new StructType().add("array", arrayOfString).add("map", 
mapOfString))
           .add("structOfUDT", structOfUDT))
     
    +  test("hive-hash for decimal") {
    +    def checkHiveHashForDecimal(
    +        input: String,
    +        precision: Int,
    +        scale: Int,
    +        expected: Long): Unit = {
    +      val decimal = Decimal.apply(new java.math.BigDecimal(input))
    +      decimal.changePrecision(precision, scale)
    +      val decimalType = DataTypes.createDecimalType(precision, scale)
    +      checkHiveHash(decimal, decimalType, expected)
    +    }
    +
    +    checkHiveHashForDecimal("18", 38, 0, 558)
    --- End diff --
    
    I did a quick check. Most are right, but some of them do not match


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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

Reply via email to