sunchao commented on a change in pull request #9047:
URL: https://github.com/apache/arrow/pull/9047#discussion_r550821867



##########
File path: rust/parquet/src/arrow/schema.rs
##########
@@ -657,6 +645,18 @@ impl ParquetTypeConverter<'_> {
         }
     }
 
+    fn to_decimal(&self) -> DataType {
+        assert!(self.schema.is_primitive());
+        if let Type::PrimitiveType {
+            precision, scale, ..
+        } = self.schema
+        {
+            DataType::Decimal(*precision as usize, *scale as usize)
+        } else {

Review comment:
       I think it may make sense to add `get_scale` and `get_precision` to 
`Type` as well, similar to other getters there, but it's just a good to have :)




----------------------------------------------------------------
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:
[email protected]


Reply via email to