AlvinJ15 commented on code in PR #13959:
URL: https://github.com/apache/arrow/pull/13959#discussion_r955752070
##########
cpp/src/arrow/dataset/file_base.h:
##########
@@ -350,23 +351,25 @@ class ARROW_DS_EXPORT FileWriter {
/// \brief Options for writing a dataset.
struct ARROW_DS_EXPORT FileSystemDatasetWriteOptions {
/// Options for individual fragment writing.
- std::shared_ptr<FileWriteOptions> file_write_options;
+ std::shared_ptr<FileWriteOptions> file_write_options =
+ CsvFileFormat().DefaultWriteOptions();
/// FileSystem into which a dataset will be written.
- std::shared_ptr<fs::FileSystem> filesystem;
+ std::shared_ptr<fs::FileSystem> filesystem =
+ std::make_shared<arrow::fs::LocalFileSystem>();
/// Root directory into which the dataset will be written.
std::string base_dir;
/// Partitioning used to generate fragment paths.
- std::shared_ptr<Partitioning> partitioning;
+ std::shared_ptr<Partitioning> partitioning = Partitioning::Default();
/// Maximum number of partitions any batch may be written into, default is
1K.
int max_partitions = 1024;
/// Template string used to generate fragment basenames.
/// {i} will be replaced by an auto incremented integer.
- std::string basename_template;
+ std::string basename_template = "data_{i}.arrow";
Review Comment:
`FileFormat` has a funtion called `type_name()` which currentyle is
returning the `dataset-file-formats`, so I think
`default_extension()` is not necessary
--
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]