liukun4515 commented on code in PR #2357:
URL: https://github.com/apache/arrow-rs/pull/2357#discussion_r940098011


##########
parquet/src/arrow/array_reader/primitive_array.rs:
##########
@@ -208,7 +210,7 @@ where
                         ))
                     }
                 }
-                .with_precision_and_scale(p, s)?;
+                .with_precision_and_scale(p, s, false)?;

Review Comment:
   from the codebase and arrow_reader from parquet, the decimal type of arrow 
is converted from the decimal type of parquet schema/meatdata.
   
   physical type of parquet just contains below types:
   ```
   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
               | PhysicalType::BYTE_ARRAY
               | PhysicalType::FIXED_LEN_BYTE_ARRAY
   ```
   The `target_type` arrow type is from logical type of parquet file, so when 
reading from the parquet file, the data must be right or valid.



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