vibhatha commented on code in PR #13401: URL: https://github.com/apache/arrow/pull/13401#discussion_r965410625
########## cpp/src/arrow/engine/substrait/relation_internal.cc: ########## @@ -162,36 +170,40 @@ Result<DeclarationInfo> FromProto(const substrait::Rel& rel, const ExtensionSet& } path = path.substr(7); - if (item.path_type_case() == - substrait::ReadRel_LocalFiles_FileOrFiles::kUriPath) { - ARROW_ASSIGN_OR_RAISE(auto file, filesystem->GetFileInfo(path)); - if (file.type() == fs::FileType::File) { - files.push_back(std::move(file)); - } else if (file.type() == fs::FileType::Directory) { + switch (item.path_type_case()) { + case substrait::ReadRel_LocalFiles_FileOrFiles::kUriPath: { Review Comment: Good note. I also saw this kind of style in a few places. May be I will make a cleanup PR after to make them uniform across Substrait. JIRA: https://issues.apache.org/jira/browse/ARROW-17647 -- 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-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org