JanKaul commented on code in PR #82:
URL: https://github.com/apache/iceberg-rust/pull/82#discussion_r1392079536


##########
crates/iceberg/src/spec/values.rs:
##########
@@ -893,9 +925,9 @@ impl Literal {
                 PrimitiveLiteral::Binary(_) => 
Type::Primitive(PrimitiveType::Binary),
                 PrimitiveLiteral::String(_) => 
Type::Primitive(PrimitiveType::String),
                 PrimitiveLiteral::UUID(_) => 
Type::Primitive(PrimitiveType::Uuid),
-                PrimitiveLiteral::Decimal(dec) => 
Type::Primitive(PrimitiveType::Decimal {
-                    precision: 38,
-                    scale: dec.scale(),
+                PrimitiveLiteral::Decimal(_) => 
Type::Primitive(PrimitiveType::Decimal {
+                    precision: MAX_DECIMAL_PRECISION,
+                    scale: 0,

Review Comment:
   Initially I thought it would be useful to directly get the type from the 
value. But in case of the decimal you would need to store the Decimal with the 
scale like @ZENOTME suggested. It might make more sense to delete this method 
entirely and use the schema to get the types.



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