RussellSpitzer commented on code in PR #13692:
URL: https://github.com/apache/iceberg/pull/13692#discussion_r2237569014


##########
core/src/main/java/org/apache/iceberg/variants/Variants.java:
##########
@@ -186,16 +186,17 @@ public static VariantPrimitive<Long> 
ofIsoTimestampntz(String value) {
   }
 
   public static VariantPrimitive<BigDecimal> of(BigDecimal value) {
-    int bitLength = value.unscaledValue().bitLength();
-    if (bitLength < 32) {
+    int precision = value.precision();
+
+    if (precision >= 1 && precision <= 9) {

Review Comment:
   Are these synonymous? I notice this matches our table in the Spec but i'm a 
little confused about if the previous behavior we wrote here was a bug.  
   
   Is it possible to have a unscaledValue bitlength < 32 and have a precision 
above 9?



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