rdblue commented on code in PR #6128:
URL: https://github.com/apache/iceberg/pull/6128#discussion_r1027341625


##########
python/pyiceberg/expressions/literals.py:
##########
@@ -381,10 +381,12 @@ def __init__(self, value: Decimal):
         super().__init__(value, Decimal)
 
     def increment(self) -> Literal[Decimal]:
-        return DecimalLiteral(self.value + 1)
+        inc_value = 1 / (10 ** abs(self.value.as_tuple().exponent))

Review Comment:
   We don't want to do decimal math like this because we then have to worry 
about precision. Instead, can you use the to/from unscaled methods?



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