From c20a0b132d28f50c398e1dc18561525acde94f77 Mon Sep 17 00:00:00 2001 From: PHILO-HE Date: Mon, 27 May 2024 09:07:44 +0800 Subject: [PATCH 1/2] Initial commit --- java/dataset/src/main/cpp/jni_wrapper.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/java/dataset/src/main/cpp/jni_wrapper.cc b/java/dataset/src/main/cpp/jni_wrapper.cc index 19a43c8d2fa..987cd5dc1b8 100644 --- a/java/dataset/src/main/cpp/jni_wrapper.cc +++ b/java/dataset/src/main/cpp/jni_wrapper.cc @@ -27,7 +27,9 @@ #include "arrow/dataset/file_base.h" #include "arrow/filesystem/localfs.h" #include "arrow/filesystem/path_util.h" +#ifdef ARROW_S3 #include "arrow/filesystem/s3fs.h" +#endif #include "arrow/engine/substrait/util.h" #include "arrow/engine/substrait/serde.h" #include "arrow/engine/substrait/relation.h" @@ -660,7 +662,9 @@ JNIEXPORT void JNICALL Java_org_apache_arrow_dataset_jni_JniWrapper_releaseBuffe JNIEXPORT void JNICALL Java_org_apache_arrow_dataset_jni_JniWrapper_ensureS3Finalized( JNIEnv* env, jobject) { JNI_METHOD_START +#ifdef ARROW_S3 JniAssertOkOrThrow(arrow::fs::EnsureS3Finalized()); +#endif JNI_METHOD_END() } From 241443ccfc084e91d2ba159f027f0bc94f939501 Mon Sep 17 00:00:00 2001 From: PHILO-HE Date: Mon, 27 May 2024 15:03:27 +0800 Subject: [PATCH 2/2] Fix comment --- java/dataset/src/main/cpp/jni_wrapper.cc | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/java/dataset/src/main/cpp/jni_wrapper.cc b/java/dataset/src/main/cpp/jni_wrapper.cc index 987cd5dc1b8..79efbeb74fc 100644 --- a/java/dataset/src/main/cpp/jni_wrapper.cc +++ b/java/dataset/src/main/cpp/jni_wrapper.cc @@ -25,11 +25,8 @@ #include "arrow/c/helpers.h" #include "arrow/dataset/api.h" #include "arrow/dataset/file_base.h" -#include "arrow/filesystem/localfs.h" +#include "arrow/filesystem/api.h" #include "arrow/filesystem/path_util.h" -#ifdef ARROW_S3 -#include "arrow/filesystem/s3fs.h" -#endif #include "arrow/engine/substrait/util.h" #include "arrow/engine/substrait/serde.h" #include "arrow/engine/substrait/relation.h"