MCPcopy Create free account
hub / github.com/apache/arrow / dataset___FileSystemDatasetFactory__Make

Function dataset___FileSystemDatasetFactory__Make

r/src/dataset.cpp:170–197  ·  view source on GitHub ↗

[[dataset::export]]

Source from the content-addressed store, hash-verified

168
169// [[dataset::export]]
170std::shared_ptr<ds::FileSystemDatasetFactory> dataset___FileSystemDatasetFactory__Make(
171 const std::shared_ptr<fs::FileSystem>& fs,
172 const std::shared_ptr<fs::FileSelector>& selector,
173 const std::shared_ptr<ds::FileFormat>& format, cpp11::list fsf_options) {
174 auto options = ds::FileSystemFactoryOptions{};
175 if (!Rf_isNull(fsf_options["partitioning"])) {
176 options.partitioning =
177 cpp11::as_cpp<std::shared_ptr<ds::Partitioning>>(fsf_options["partitioning"]);
178 } else if (!Rf_isNull(fsf_options["partitioning_factory"])) {
179 options.partitioning = cpp11::as_cpp<std::shared_ptr<ds::PartitioningFactory>>(
180 fsf_options["partitioning_factory"]);
181 }
182 if (!Rf_isNull(fsf_options["partition_base_dir"])) {
183 options.partition_base_dir =
184 cpp11::as_cpp<std::string>(fsf_options["partition_base_dir"]);
185 }
186 if (!Rf_isNull(fsf_options["exclude_invalid_files"])) {
187 options.exclude_invalid_files =
188 cpp11::as_cpp<bool>(fsf_options["exclude_invalid_files"]);
189 }
190 if (!Rf_isNull(fsf_options["selector_ignore_prefixes"])) {
191 options.selector_ignore_prefixes =
192 cpp11::as_cpp<std::vector<std::string>>(fsf_options["selector_ignore_prefixes"]);
193 }
194
195 return arrow::internal::checked_pointer_cast<ds::FileSystemDatasetFactory>(
196 ValueOrStop(ds::FileSystemDatasetFactory::Make(fs, *selector, format, options)));
197}
198
199// [[dataset::export]]
200std::shared_ptr<ds::FileSystemDatasetFactory>

Calls 2

ValueOrStopFunction · 0.85
MakeFunction · 0.50

Tested by

no test coverage detected