westonpace commented on code in PR #12977:
URL: https://github.com/apache/arrow/pull/12977#discussion_r882058122


##########
cpp/src/arrow/dataset/partition.cc:
##########
@@ -395,18 +396,18 @@ Result<std::vector<KeyValuePartitioning::Key>> 
FilenamePartitioning::ParseKeys(
   return ParsePartitionSegments(segments);

Review Comment:
   Shouldn't the line above be...
   
   ```
   std::vector<std::string> segments =
         
fs::internal::SplitAbstractPath(StripNonPrefix(fs::internal::GetAbstractPathParent(path).second)path),
 kFilenamePartitionSep);
   ```
   In other words, if the path is `foo/bar/x=3_y=5_chunk0.parquet`:
   
   ```
   StripNonPrefix(path) // foo/bar/x=3_y=5
   fs::internal::GetAbstractPathParent(path).second // x=3_y=5_chunk0.parquet
   StripNonPrefix(fs::internal::GetAbstractPathParent(path).second) // x=3_y=5
   ```



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

Reply via email to