etseidl commented on code in PR #10106:
URL: https://github.com/apache/arrow-rs/pull/10106#discussion_r3715558915


##########
parquet/src/file/writer.rs:
##########
@@ -2619,4 +2619,97 @@ mod tests {
         }
         writer.close().unwrap();
     }
+
+    #[test]
+    fn test_int96_interop() {
+        // this file has an INT96 column. rewrite it with min/max statistics 
sorted per
+        // recent changes to the spec. (see 
https://github.com/apache/parquet-format/pull/584)
+        let file = get_test_file("int96_timestamp_order.parquet");
+        let read_opts = ReadOptionsBuilder::new().with_page_index().build();
+        let reader = SerializedFileReader::new_with_options(file, 
read_opts).unwrap();
+        let file_metadata = reader.metadata().file_metadata();
+        let schema = file_metadata.schema_descr().root_schema_ptr();
+        assert_eq!(
+            file_metadata.column_order(0),
+            ColumnOrder::INT96_TIMESTAMP_ORDER
+        );
+
+        // save read stats for later
+        let stats = reader
+            .metadata()
+            .row_group(0)
+            .column(0)
+            .statistics()
+            .expect("statistics missing");
+        let exp_min = stats.min_bytes_opt().expect("min stats missing");
+        let exp_max = stats.max_bytes_opt().expect("max stats missing");
+
+        let col_idx = reader

Review Comment:
   done in 
https://github.com/apache/arrow-rs/pull/10106/commits/6b5d992b2f15aec991fb07a74401a82a3bec2ca1
 and 
https://github.com/apache/arrow-rs/pull/10106/commits/edc89339253b25a474b60f4168a99a80e0ef2905



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