pitrou commented on a change in pull request #9130: URL: https://github.com/apache/arrow/pull/9130#discussion_r557409506
########## File path: cpp/src/arrow/dataset/file_base.cc ########## @@ -313,12 +313,16 @@ Status FileSystemDataset::Write(const FileSystemDatasetWriteOptions& write_optio ARROW_ASSIGN_OR_RAISE(auto groups, write_options.partitioning->Partition(batch)); batch.reset(); // drop to hopefully conserve memory + if (static_cast<int>(groups.batches.size()) > write_options.max_partitions) { Review comment: Rather, cast `max_partitions` to `size_t`. ########## File path: cpp/src/arrow/dataset/file_base.cc ########## @@ -313,12 +313,16 @@ Status FileSystemDataset::Write(const FileSystemDatasetWriteOptions& write_optio ARROW_ASSIGN_OR_RAISE(auto groups, write_options.partitioning->Partition(batch)); batch.reset(); // drop to hopefully conserve memory + if (static_cast<int>(groups.batches.size()) > write_options.max_partitions) { Review comment: Rather, cast `max_partitions` to `size_t` or `int64_t`. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org