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


##########
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:
   How are making PrimitiveLiteral::Decimal as `(i128,i64) ` to store the value 
in the first one and the scale in the later one? 🤔 



##########
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:
   How are making PrimitiveLiteral::Decimal as `(i128,i64) ` to store the value 
in the first one and the scale in the later one? 🤔 



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