nevi-me commented on a change in pull request #9397:
URL: https://github.com/apache/arrow/pull/9397#discussion_r570609608



##########
File path: rust/parquet/src/arrow/schema.rs
##########
@@ -409,13 +413,15 @@ fn arrow_to_parquet_type(field: &Field) -> Result<Type> {
                 .with_length(*length)
                 .build()
         }
-        DataType::Decimal(precision, _) => Type::primitive_type_builder(
-            name,
-            PhysicalType::FIXED_LEN_BYTE_ARRAY,
-        )
-        .with_repetition(repetition)
-        .with_length((10.0_f64.powi(*precision as i32).log2() / 8.0).ceil() as 
i32)
-        .build(),
+        DataType::Decimal(precision, scale) => {
+            Type::primitive_type_builder(name, 
PhysicalType::FIXED_LEN_BYTE_ARRAY)

Review comment:
       Are we taking the option of always writing decimals as FLBA? I'm fine 
with that, just confirming.
   I don't know under what conditions one would want to use i32 or i64. Is it 
related to precision and scale?




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

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


Reply via email to