You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2023/01/05 23:13:52 UTC

[GitHub] [arrow-rs] viirya commented on a diff in pull request #3470: Fix CSV infinite loop and improve error messages

viirya commented on code in PR #3470:
URL: https://github.com/apache/arrow-rs/pull/3470#discussion_r1062972601


##########
arrow-csv/src/reader/records.rs:
##########
@@ -135,28 +139,38 @@ impl<R: BufRead> RecordReader<R> {
                 });
             });
 
-        Ok(())
+        self.line_number += read;
+
+        Ok(read)
     }
 
     /// Skips forward `to_skip` rows
-    pub fn skip(&mut self, mut to_skip: usize) -> Result<(), ArrowError> {
+    pub fn skip(&mut self, to_skip: usize) -> Result<(), ArrowError> {

Review Comment:
   Maybe we can document the error behavior.



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

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