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


##########
parquet/src/arrow/arrow_reader.rs:
##########
@@ -1238,4 +1290,97 @@ mod tests {
         let val = list.value(0);
         assert_eq!(val.len(), 0);
     }
+
+    #[test]
+    fn test_null_schema_inference() {
+        let testdata = arrow::util::test_util::parquet_test_data();
+        let path = format!("{}/null_list.parquet", testdata);
+        let reader =
+            
Arc::new(SerializedFileReader::try_from(File::open(&path).unwrap()).unwrap());
+
+        let arrow_field = Field::new(
+            "emptylist",
+            ArrowDataType::List(Box::new(Field::new("item", 
ArrowDataType::Null, true))),
+            true,
+        );
+
+        let options = 
ArrowReaderOptions::default().with_skip_arrow_metadata(true);
+        let mut arrow_reader = 
ParquetFileArrowReader::new_with_options(reader, options);
+        let schema = arrow_reader.get_schema().unwrap();
+        assert_eq!(schema.fields().len(), 1);
+        assert_eq!(schema.field(0), &arrow_field);
+    }
+
+    #[test]

Review Comment:
   This is the closest I could get to a test of #1459 as we always write and 
decode the LogicalType, even when technically PARQUET_1_0 doesn't support it. 
The nature of thrift means this isn't actually a bug I don't think



-- 
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-unsubscr...@arrow.apache.org

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

Reply via email to