Skip to content

Commit

Permalink
fix compile
Browse files Browse the repository at this point in the history
  • Loading branch information
jinchengchenghh committed May 16, 2024
1 parent df5705e commit af36f25
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions java/dataset/src/main/cpp/jni_wrapper.cc
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ arrow::Result<std::shared_ptr<arrow::dataset::FileFormat>> GetFileFormat(

arrow::Result<std::shared_ptr<arrow::dataset::FragmentScanOptions>>
GetFragmentScanOptions(jint file_format_id,
const std::unordered_map<std::string, string>& configs) {
const std::unordered_map<std::string, std::string>& configs) {
switch (file_format_id) {
#ifdef ARROW_CSV
case 3:
Expand Down Expand Up @@ -574,11 +574,11 @@ JNIEXPORT jlong JNICALL Java_org_apache_arrow_dataset_jni_JniWrapper_createScann
JniAssertOkOrThrow(scanner_builder->Filter(*filter_expr));
}
if (file_format_id != -1 && options != nullptr) {
std::unordered_map<std::string, std::string> optionMap;
std::unordered_map<std::string, std::string> option_map;
std::shared_ptr<arrow::Buffer> buffer = LoadArrowBufferFromByteBuffer(env, options);
JniAssertOkOrThrow(arrow::engine::DeserializeMap(*buffer, optionMap));
JniAssertOkOrThrow(arrow::engine::DeserializeMap(*buffer, option_map));
std::shared_ptr<arrow::dataset::FragmentScanOptions> scan_options =
JniGetOrThrow(GetragmentScanOptions(file_format_id, optionsMap));
JniGetOrThrow(GetFragmentScanOptions(file_format_id, option_map));
JniAssertOkOrThrow(scanner_builder->FragmentScanOptions(scan_options));
}
JniAssertOkOrThrow(scanner_builder->BatchSize(batch_size));
Expand Down Expand Up @@ -701,11 +701,11 @@ Java_org_apache_arrow_dataset_file_JniWrapper_makeFileSystemDatasetFactory__Ljav
std::shared_ptr<arrow::dataset::FileFormat> file_format =
JniGetOrThrow(GetFileFormat(file_format_id));
if (options != nullptr) {
std::unordered_map<std::string, std::string> optionMap;
std::unordered_map<std::string, std::string> option_map;
std::shared_ptr<arrow::Buffer> buffer = LoadArrowBufferFromByteBuffer(env, options);
JniAssertOkOrThrow(arrow::engine::DeserializeMap(*buffer, optionMap));
JniAssertOkOrThrow(arrow::engine::DeserializeMap(*buffer, option_map));
std::shared_ptr<arrow::dataset::FragmentScanOptions> scan_options =
JniGetOrThrow(GetragmentScanOptions(file_format_id, optionsMap));
JniGetOrThrow(GetFragmentScanOptions(file_format_id, option_map));
file_format->default_fragment_scan_options = scan_options;
}
arrow::dataset::FileSystemFactoryOptions options;
Expand All @@ -729,11 +729,11 @@ Java_org_apache_arrow_dataset_file_JniWrapper_makeFileSystemDatasetFactory___3Lj
std::shared_ptr<arrow::dataset::FileFormat> file_format =
JniGetOrThrow(GetFileFormat(file_format_id));
if (options != nullptr) {
std::unordered_map<std::string, std::string> optionMap;
std::unordered_map<std::string, std::string> option_map;
std::shared_ptr<arrow::Buffer> buffer = LoadArrowBufferFromByteBuffer(env, options);
JniAssertOkOrThrow(arrow::engine::DeserializeMap(*buffer, optionMap));
JniAssertOkOrThrow(arrow::engine::DeserializeMap(*buffer, option_map));
std::shared_ptr<arrow::dataset::FragmentScanOptions> scan_options =
JniGetOrThrow(GetragmentScanOptions(file_format_id, optionsMap));
JniGetOrThrow(GetFragmentScanOptions(file_format_id, option_map));
file_format->default_fragment_scan_options = scan_options;
}
arrow::dataset::FileSystemFactoryOptions options;
Expand Down

0 comments on commit af36f25

Please sign in to comment.