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 2022/04/28 15:23:44 UTC

[GitHub] [arrow-rs] sunchao commented on a diff in pull request #1621: Fix decimals min max statistics

sunchao commented on code in PR #1621:
URL: https://github.com/apache/arrow-rs/pull/1621#discussion_r861024451


##########
parquet/src/column/writer.rs:
##########
@@ -1006,6 +1006,41 @@ impl<T: DataType> ColumnWriterImpl<T> {
                 return a.as_u64().unwrap() > b.as_u64().unwrap();
             }
         }
+
+        match self.descr.converted_type() {
+            ConvertedType::UINT_8
+            | ConvertedType::UINT_16
+            | ConvertedType::UINT_32
+            | ConvertedType::UINT_64 => {
+                return a.as_u64().unwrap() > b.as_u64().unwrap();
+            }
+            _ => {}
+        };
+
+        if let Some(LogicalType::Decimal { .. }) = self.descr.logical_type() {
+            match self.descr.physical_type() {

Review Comment:
   Decimals can be represented via `INT32` and `INT64` too.



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org