alamb commented on code in PR #6630:
URL: https://github.com/apache/arrow-rs/pull/6630#discussion_r1819195593
##########
parquet/src/arrow/async_reader/metadata.rs:
##########
@@ -119,7 +119,7 @@ impl<F: MetadataFetch> MetadataLoader<F> {
return Err(ParquetError::EOF(format!(
"file size of {} is less than footer + metadata {}",
file_size,
- length + 8
+ length + FOOTER_SIZE
Review Comment:
💯
##########
parquet/src/errors.rs:
##########
@@ -47,6 +47,8 @@ pub enum ParquetError {
IndexOutOfBound(usize, usize),
/// An external error variant
External(Box<dyn Error + Send + Sync>),
+ /// Returned when a function needs more data to complete properly.
+ NeedMoreData(usize),
Review Comment:
Can we also mark `ParquetError` non exhaustive at the same time (so future
additions won't be breaking API changes)?
Like this:
https://github.com/apache/arrow-rs/blob/56525efbd5f37b89d1b56aa51709cab9f81bc89e/object_store/src/lib.rs#L1228
##########
parquet/src/errors.rs:
##########
@@ -47,6 +47,8 @@ pub enum ParquetError {
IndexOutOfBound(usize, usize),
/// An external error variant
External(Box<dyn Error + Send + Sync>),
+ /// Returned when a function needs more data to complete properly.
Review Comment:
Could you also add some additional comments on how to interpret the
argument. Is it the number of bytes that is needed?
Maybe we can return a `Range` or something more specific about what is
needed if it isn't always clear
--
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]