hcrosse commented on code in PR #1515:
URL: https://github.com/apache/arrow-go/pull/1515#discussion_r4543243198


##########
arrow/array/decimal.go:
##########
@@ -96,8 +96,11 @@ func (a *baseDecimal[T]) GetOneForMarshal(i int) any {
        }
 
        typ := a.DataType().(arrow.DecimalType)
-       n, scale := a.Value(i), typ.GetScale()
-       return utils.FormatDecimalG(n, typ.GetPrecision(), scale)
+       s, err := utils.FormatDecimalG(a.Value(i), typ)
+       if err != nil {
+               return fmt.Sprintf("<scale out of range, cannot format 
Decimal%d value>", typ.BitWidth())

Review Comment:
   I'll leave this for the change that rejects these types at creation. I also 
updated the description to put the placeholder threshold at `MaxScale`.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to