pvary commented on code in PR #16627:
URL: https://github.com/apache/iceberg/pull/16627#discussion_r3334794163


##########
arrow/src/main/java/org/apache/iceberg/arrow/vectorized/ArrowVectorAccessors.java:
##########
@@ -99,7 +99,9 @@ public BigDecimal ofLong(long value, int precision, int 
scale) {
 
     @Override
     public BigDecimal ofBigDecimal(BigDecimal value, int precision, int scale) 
{
-      return BigDecimal.valueOf(value.unscaledValue().longValue(), scale);
+      // Return the value unchanged: it already has the correct unscaled value 
and scale. The
+      // unscaled value can exceed the range of a long, so it must not be 
narrowed to one.

Review Comment:
   Are we sure that we have the correct scale and precision here?



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


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

Reply via email to