sanjibansg commented on a change in pull request #12530:
URL: https://github.com/apache/arrow/pull/12530#discussion_r835552303
##########
File path: cpp/src/arrow/dataset/partition.cc
##########
@@ -361,7 +412,32 @@ Result<std::string> DirectoryPartitioning::FormatValues(
break;
}
- return fs::internal::JoinAbstractPath(std::move(segments));
+ return
PartitionPathFormat{fs::internal::JoinAbstractPath(std::move(segments)), ""};
+}
+
+Result<Partitioning::PartitionPathFormat> FilenamePartitioning::FormatValues(
+ const ScalarVector& values) const {
+ std::vector<std::string>
segments(static_cast<size_t>(schema_->num_fields()));
Review comment:
Yes, I thought the way to perform FilenamePartitioning should be very
similar to DirectoryPartitioning. I have changed the implementation of
`FormatValues`, `Inspect` and `ParseKeys` methods of these two classes to use
functions present in the parent class KeyValuePartitioning which have the
common operation so as to reduce code repetitions. Does this approach looks
good?
--
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]