You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2021/03/15 14:24:56 UTC
[GitHub] [arrow] bkietz commented on a change in pull request #9686: ARROW-9749: [C++][GLib][Python][R][Ruby][Dataset] Introduce FragmentScanOptions, consolidate ScanContext/ScanOptions
bkietz commented on a change in pull request #9686:
URL: https://github.com/apache/arrow/pull/9686#discussion_r594377066
##########
File path: cpp/src/jni/dataset/jni_wrapper.cc
##########
@@ -431,13 +431,13 @@ JNIEXPORT jlong JNICALL Java_org_apache_arrow_dataset_jni_JniWrapper_createScann
if (pool == nullptr) {
JniThrow("Memory pool does not exist or has been closed");
}
- std::shared_ptr<arrow::dataset::ScanContext> context =
- std::make_shared<arrow::dataset::ScanContext>();
- context->pool = pool;
+ std::shared_ptr<arrow::dataset::ScanOptions> options =
+ std::make_shared<arrow::dataset::ScanOptions>();
+ options->pool = pool;
std::shared_ptr<arrow::dataset::Dataset> dataset =
RetrieveNativeInstance<arrow::dataset::Dataset>(dataset_id);
std::shared_ptr<arrow::dataset::ScannerBuilder> scanner_builder =
- JniGetOrThrow(dataset->NewScan(context));
+ JniGetOrThrow(dataset->NewScan(options));
Review comment:
Instead of constructing ScanOptions above:
```suggestion
JniAssertOkOrThrow(scanner_builder->Pool(pool));
```
##########
File path: cpp/src/arrow/dataset/scanner.h
##########
@@ -198,10 +183,10 @@ class ARROW_DS_EXPORT Scanner {
class ARROW_DS_EXPORT ScannerBuilder {
public:
ScannerBuilder(std::shared_ptr<Dataset> dataset,
- std::shared_ptr<ScanContext> scan_context);
+ std::shared_ptr<ScanOptions> scan_options);
Review comment:
Is it worthwhile to require ScannerBuilder be constructed with this `scan_options` argument? Maybe we could just have `explicit ScannerBuilder(std::shared_ptr<Dataset>)` construct a defaulted ScanOptions
----------------------------------------------------------------
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:
users@infra.apache.org