You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2021/01/03 06:43:54 UTC

[GitHub] [arrow] nevi-me commented on a change in pull request #9047: ARROW-11072: [Rust] [Parquet] Support reading decimal from physical int types

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



##########
File path: rust/parquet/src/arrow/schema.rs
##########
@@ -591,6 +591,7 @@ impl ParquetTypeConverter<'_> {
             LogicalType::INT_32 => Ok(DataType::Int32),
             LogicalType::DATE => Ok(DataType::Date32(DateUnit::Day)),
             LogicalType::TIME_MILLIS => Ok(DataType::Time32(TimeUnit::Millisecond)),
+            LogicalType::DECIMAL => self.to_decimal(),

Review comment:
       @sweb what does downcasting the array straignt to an i64 result in? Does the below panic?
   
   ```rust
   let mut builder = DecimalBuilder::new(array.len(), *p, *s);
   let values = array.as_any().downcast_ref::<Int64Array>().unwrap();
   ```




----------------------------------------------------------------
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:
users@infra.apache.org