Github user davies commented on the pull request:

    https://github.com/apache/spark/pull/7744#issuecomment-125854843
  
    @viirya Thanks for working on this. It seems that your patch only works for 
precision <= 18, we should support the full range (0 < precision <= 38).
    
    Because we always know the DataType (it's DecimalType, having precision and 
scale), so we could change the getter and setter to 
    ```
      def getDecimal(i: Int, precision: Int, scale: Int): Decimal
      def setDecimal(i: Int, value: Decimal, precision: Int)
    ```
    
    For UnsafeRow, we could have different representation for precision <= 18 
(using long) and 18 < precision <= 38 (serialize the BigDecimal into bytes).



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