JanKaul commented on issue #159:
URL: https://github.com/apache/iceberg-rust/issues/159#issuecomment-1884586498

   Following @Fokko's reasoning, Decimal is comparable to TimestampZ where the 
timezone is stored in the type. Similarly the scale of the Decimal is stored in 
the type.
   
   I think it makes sense to think about the use cases for Literal. It is used 
for partition values and default values. Both require only the physical 
representation. The scale is actually not needed and Literal(i128) would 
suffice for these use cases.
   
   @liurenjie1024 mentioned error messages as another use cases. That's the 
only time that the i128 representation might not be suitable. The question is 
whether the error messages warrant a more complex implementation.
   
   Regarding @Fokko's example: Doesn't initially storing the Decimal as a 
LiteralFloat loose accuracy because the 3.25 is stored as something like 
3.24999999987. If you then convert it to Decimal, it's inaccurate. Maybe you 
could use PrimitiveLiteral::String 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: issues-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to