AlenkaF commented on issue #20176:
URL: https://github.com/apache/arrow/issues/20176#issuecomment-5356987747

   Adding a bit of notes after the research I did with Claude, in case this is 
still relevant (wasn't able to test locally).
   
   In It seems that the problem with double slashes in path only 
happened/happens when reading a directory of partitioned files, not when 
reading a specific file directly.
   
   Copilot suggests that the issue is in Arrow's dataset discovery code (in 
`cpp/src/arrow/dataset/discovery.cc`) and that the paths should be normalized 
before the `RemoveAncestor()` comparison in:
   
   
https://github.com/apache/arrow/blob/118892700b95fdfa9a6b3e482a6e5399563f5d75/cpp/src/arrow/dataset/discovery.cc#L195-L196
   
   For example with adding:
   
   ```cpp
   ARROW_ASSIGN_OR_RAISE(auto normalized_base_dir, 
                         filesystem->NormalizePath(selector.base_dir));
   ARROW_ASSIGN_OR_RAISE(auto normalized_path, 
                         filesystem->NormalizePath(info.path()));
   ```


-- 
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]

Reply via email to