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


##########
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:
   Ok.  I am happy keeping it how it is.  If a user wants to avoid 
basename_template they can just set it to `"{i}"`.



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