You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "HaochengLIU (via GitHub)" <gi...@apache.org> on 2023/04/12 01:03:43 UTC
[GitHub] [arrow] HaochengLIU commented on a diff in pull request #34984: GH-34565: [C++] Teach dataset_writer to accept custom filename functor
HaochengLIU commented on code in PR #34984:
URL: https://github.com/apache/arrow/pull/34984#discussion_r1163461925
##########
cpp/src/arrow/dataset/dataset_writer.cc:
##########
@@ -308,11 +309,24 @@ class DatasetWriterDirectoryQueue {
}
Result<std::string> GetNextFilename() {
- auto basename = ::arrow::internal::Replace(write_options_.basename_template,
- kIntegerToken, ToChars(file_counter_++));
+ std::optional<std::string> basename;
+ if (write_options_.basename_template_functor == nullptr) {
+ basename = ::arrow::internal::Replace(write_options_.basename_template,
+ kIntegerToken, ToChars(file_counter_++));
+ } else {
+ basename = ::arrow::internal::Replace(
Review Comment:
good point, updated
--
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-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org