wgtmac commented on code in PR #50061:
URL: https://github.com/apache/arrow/pull/50061#discussion_r3329879775
##########
cpp/src/arrow/io/interfaces.cc:
##########
@@ -151,7 +151,9 @@ RandomAccessFile::RandomAccessFile() : interface_impl_(new
Impl()) {}
Result<int64_t> RandomAccessFile::ReadAt(int64_t position, int64_t nbytes,
bool allow_short_read, void* out) {
+ ARROW_SUPPRESS_DEPRECATION_WARNING
Review Comment:
Why not switching to non-deprecated equivalent?
##########
cpp/src/arrow/io/interfaces.h:
##########
@@ -295,6 +294,7 @@ class ARROW_EXPORT RandomAccessFile : public InputStream,
public Seekable {
/// \param[in] nbytes The number of bytes to read
/// \param[out] out The buffer to read bytes into
/// \return The number of bytes read, or an error
+ ARROW_DEPRECATED("Deprecated in 17.0.0. Use signature with allow_short_read
instead")
Review Comment:
It should be 25.0.0 if I understand correctly.
##########
cpp/src/arrow/io/interfaces.h:
##########
@@ -29,7 +29,6 @@
#include "arrow/util/macros.h"
#include "arrow/util/type_fwd.h"
#include "arrow/util/visibility.h"
-
Review Comment:
Please revert this unrelated change.
##########
cpp/src/arrow/io/interfaces.cc:
##########
@@ -277,7 +281,7 @@ class FileSegmentReader
RETURN_NOT_OK(CheckOpen());
int64_t bytes_to_read = std::min(nbytes, nbytes_ - position_);
ARROW_ASSIGN_OR_RAISE(int64_t bytes_read,
- file_->ReadAt(file_offset_ + position_,
bytes_to_read, out));
+ file_->ReadAt(file_offset_ + position_,
bytes_to_read,/*allow_short_read=*/true, out));
Review Comment:
```suggestion
file_->ReadAt(file_offset_ + position_,
bytes_to_read, /*allow_short_read=*/true, out));
```
Same for others.
--
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]