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 2020/07/15 16:59:26 UTC

[GitHub] [arrow] sunchao commented on a change in pull request #7751: ARROW-9461: [Rust] Fixed error in reading Date32 and Date64.

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



##########
File path: rust/parquet/src/arrow/array_reader.rs
##########
@@ -196,11 +196,13 @@ impl<T: DataType> ArrayReader for PrimitiveArrayReader<T> {
                         .convert(self.record_reader.cast::<Int64Type>()),
                     _ => Err(general_err!("No conversion from parquet type to arrow type for timestamp with unit {:?}", unit)),
                 },
-                (ArrowType::Date32(_), PhysicalType::INT32) => {
-                    UInt32Converter::new().convert(self.record_reader.cast::<Int32Type>())
+                (ArrowType::Date32(unit), PhysicalType::INT32) => match unit {
+                    DateUnit::Day => Date32Converter::new().convert(self.record_reader.cast::<Int32Type>()),

Review comment:
       nit: long line. Please limit width to 90 chars. Same below.




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