westonpace commented on code in PR #14199:
URL: https://github.com/apache/arrow/pull/14199#discussion_r979037961
##########
cpp/src/arrow/dataset/dataset_writer.cc:
##########
@@ -348,9 +348,9 @@ class DatasetWriterDirectoryQueue {
util::AsyncTaskScheduler::Throttle* throttle_view = throttle.get();
util::AsyncTaskScheduler* file_scheduler = scheduler_->MakeSubScheduler(
FileFinishTask{this, std::move(file_queue), std::move(throttle)},
throttle_view);
- if (init_task_) {
- file_scheduler->AddSimpleTask(init_task_);
- init_task_ = {};
+ if (init_future_.is_valid()) {
Review Comment:
This means that `(directory_.empty() || !write_options_.create_dir)` is
`true`. So either we are not doing a partitioned write (and so don't need to
create any directories) or we expect all the directories to be pre-created (and
open file will fail later if they are not).
--
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]