tustvold commented on code in PR #1803:
URL: https://github.com/apache/arrow-rs/pull/1803#discussion_r890496351
##########
parquet/src/arrow/async_reader.rs:
##########
@@ -101,8 +103,63 @@ use crate::file::footer::parse_metadata_buffer;
use crate::file::metadata::ParquetMetaData;
use crate::file::reader::SerializedPageReader;
use crate::file::PARQUET_MAGIC;
-use crate::schema::types::{ColumnDescPtr, SchemaDescPtr};
-use crate::util::memory::ByteBufferPtr;
+use crate::schema::types::{ColumnDescPtr, SchemaDescPtr, SchemaDescriptor};
+
+/// A reader that can asynchronously read a range of bytes
+pub trait AsyncChunkReader: Send + Unpin + 'static {
+ /// Retrieve the bytes in `range`
+ fn get_bytes(&mut self, range: Range<usize>) -> BoxFuture<'_,
Result<Bytes>>;
+
+ /// Retrieve the [`ParquetMetaData`] for this file
+ fn get_metadata(&mut self) -> BoxFuture<'_, Result<Arc<ParquetMetaData>>>;
Review Comment:
I've split the traits up, but it feels very odd to me to have two traits
implemented on the same type that is then passed to
`ParquetRecordBatchStreamBuilder::new`...
I'll revisit in the morning, I feel this has just made it more confusing
tbh...
--
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]