tustvold commented on code in PR #1560:
URL: https://github.com/apache/arrow-rs/pull/1560#discussion_r849553157
##########
parquet/src/arrow/array_reader/empty_array.rs:
##########
@@ -0,0 +1,58 @@
+use crate::arrow::array_reader::ArrayReader;
+use crate::errors::Result;
+use arrow::array::{ArrayDataBuilder, ArrayRef, StructArray};
+use arrow::datatypes::DataType as ArrowType;
+use std::any::Any;
+use std::sync::Arc;
+
+/// Returns an [`ArrayReader`] that yields [`StructArray`] with no columns
+/// but with row counts that correspond to the amount of data in the file
+///
+/// This is useful for when projection eliminates all columns within a
collection
+pub fn make_empty_array_reader(row_count: usize) -> Box<dyn ArrayReader> {
Review Comment:
I don't like this name, but it was the best I could come up with
--
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]