tustvold commented on code in PR #2835:
URL: https://github.com/apache/arrow-rs/pull/2835#discussion_r994152586


##########
parquet/src/arrow/array_reader/primitive_array.rs:
##########
@@ -169,15 +170,21 @@ where
             .null_bit_buffer(self.record_reader.consume_bitmap_buffer());
 
         let array_data = unsafe { array_data.build_unchecked() };
-        let array = match T::get_physical_type() {
-            PhysicalType::BOOLEAN => Arc::new(BooleanArray::from(array_data)) 
as ArrayRef,
-            PhysicalType::INT32 => Arc::new(Int32Array::from(array_data)) as 
ArrayRef,
-            PhysicalType::INT64 => Arc::new(Int64Array::from(array_data)) as 
ArrayRef,
-            PhysicalType::FLOAT => Arc::new(Float32Array::from(array_data)) as 
ArrayRef,
-            PhysicalType::DOUBLE => Arc::new(Float64Array::from(array_data)) 
as ArrayRef,
-            PhysicalType::INT96 => {
-                Arc::new(TimestampNanosecondArray::from(array_data)) as 
ArrayRef
-            }
+        let array: ArrayRef = match T::get_physical_type() {
+            PhysicalType::BOOLEAN => Arc::new(BooleanArray::from(array_data)),
+            PhysicalType::INT32 => match array_data.data_type() {
+                ArrowType::UInt32 => Arc::new(UInt32Array::from(array_data)),

Review Comment:
   Sort of, it doesn't actually matter as the PrimitiveArray is discarded by 
the parent StructArrayReader, which is only concerned with the ArrayData portion



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

Reply via email to