pitrou commented on code in PR #43409:
URL: https://github.com/apache/arrow/pull/43409#discussion_r1704210057


##########
cpp/src/arrow/io/buffered.cc:
##########
@@ -434,6 +434,32 @@ class BufferedInputStream::Impl : public BufferedBase {
     return std::shared_ptr<Buffer>(std::move(buffer));
   }
 
+  Status Advance(int64_t nbytes) {
+    if (nbytes < 0) {
+      return Status::Invalid("Bytes to advance must be non-negative. 
Received:", nbytes);
+    }
+    if (nbytes == 0) {
+      return Status::OK();
+    }
+
+    if (nbytes < bytes_buffered_) {

Review Comment:
   ```suggestion
       if (nbytes <= bytes_buffered_) {
   ```



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