[
https://issues.apache.org/jira/browse/ARROW-805?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15965024#comment-15965024
]
Leif Walsh commented on ARROW-805:
----------------------------------
Good news, everyone! I got these tests to pass. I had to run them in a
separate docker container that was linked with the hdfs one though, which isn't
great. I'll try my hand at automating it tonight but don't expect to get that
far.
This PR has my changes but not CI changes
https://github.com/apache/arrow/pull/528
I think we should deal with CI in a separate PR, though I will start working on
it now.
> listing empty HDFS directory returns an error instead of returning empty list
> -----------------------------------------------------------------------------
>
> Key: ARROW-805
> URL: https://issues.apache.org/jira/browse/ARROW-805
> Project: Apache Arrow
> Issue Type: Bug
> Affects Versions: 0.2.0, 0.3.0
> Reporter: Leif Walsh
> Assignee: Leif Walsh
> Fix For: 0.3.0
>
>
> https://github.com/apache/arrow/blob/master/cpp/src/arrow/io/hdfs.cc#L409-L410
> {code}
> if (entries == nullptr) {
> // If the directory is empty, entries is NULL but errno is 0. Non-zero
> // errno indicates error
> //
> // Note: errno is thread-locala
> if (errno == 0) { num_entries = 0; }
> { return Status::IOError("HDFS: list directory failed"); }
> }
> {code}
> I think that should have an else:
> {code}
> if (entries == nullptr) {
> // If the directory is empty, entries is NULL but errno is 0. Non-zero
> // errno indicates error
> //
> // Note: errno is thread-locala
> if (errno == 0) {
> num_entries = 0;
> } else {
> return Status::IOError("HDFS: list directory failed");
> }
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)