mzabaluev commented on code in PR #8930:
URL: https://github.com/apache/arrow-rs/pull/8930#discussion_r2733892708


##########
arrow-avro/src/reader/async_reader/builder.rs:
##########
@@ -117,14 +117,23 @@ impl<R: AsyncFileReader> ReaderBuilder<R> {
             let range_to_fetch = position
                 ..(position + 
self.header_size_hint.unwrap_or(DEFAULT_HEADER_SIZE_HINT))
                     .min(self.file_size);
-            let current_data = 
self.reader.get_bytes(range_to_fetch).await.map_err(|err| {
+
+            // Maybe EOF after the header, no actual data
+            if range_to_fetch.is_empty() {
+                break;
+            }
+
+            let current_data = 
self.reader.get_bytes(range_to_fetch.clone()).await.map_err(|err| {
                 AvroError::General(format!(
-                    "Error fetching Avro header from object store: {err}"
+                    "Error fetching Avro header from object store(range: 
{range_to_fetch:?}): {err}"

Review Comment:
   This looks like a debugging artefact; add a space after "store" at least?



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