anjakefala commented on code in PR #34170:
URL: https://github.com/apache/arrow/pull/34170#discussion_r1116371032
##########
cpp/src/arrow/filesystem/localfs.cc:
##########
@@ -228,7 +247,12 @@ Status StatSelector(const PlatformFilename& dir_fn, const
FileSelector& select,
for (const auto& child_fn : *result) {
PlatformFilename full_fn = dir_fn.Join(child_fn);
- ARROW_ASSIGN_OR_RAISE(FileInfo info, StatFile(full_fn.ToNative()));
+ FileInfo info;
+ if (select.needs_extended_file_info == true) {
+ ARROW_ASSIGN_OR_RAISE(info, StatFile(full_fn.ToNative()));
+ } else {
+ ARROW_ASSIGN_OR_RAISE(info, IdentifyFile(full_fn.ToNative()));
Review Comment:
Good point! I am making changes to address this. I was trying to avoid
duplicating bunches of `StatSelector` code basically. But there are better ways
of handling that.
--
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]