jorisvandenbossche commented on a change in pull request #9949:
URL: https://github.com/apache/arrow/pull/9949#discussion_r611828323
##########
File path: cpp/src/arrow/io/hdfs.cc
##########
@@ -497,12 +501,15 @@ class HadoopFileSystem::HadoopFileSystemImpl {
Status OpenReadable(const std::string& path, int32_t buffer_size,
const io::IOContext& io_context,
std::shared_ptr<HdfsReadableFile>* file) {
+ errno = 0;
hdfsFile handle = driver_->OpenFile(fs_, path.c_str(), O_RDONLY,
buffer_size, 0, 0);
if (handle == nullptr) {
- const char* msg = !Exists(path) ? "HDFS file does not exist: "
- : "HDFS path exists, but opening file
failed: ";
- return Status::IOError(msg, path);
+ if (errno) {
Review comment:
Dummy question, since the `errno` variable is never passed to a libhdfs
method, how can this ever have another value than 0?
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]