-
Notifications
You must be signed in to change notification settings - Fork 4k
GH-41836: [Java] Fix an undefined symbol error when ARROW_S3=OFF #41837
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
|
|
@github-actions crossbow submit -g java |
|
Revision: 1ef554d51d772a7c5970abc3b8f53afbb0924be6 Submitted crossbow builds: ursacomputing/crossbow @ actions-8150e0c94c |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you confirm whether arrow/util/config.h is included here implicitly?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kou, thanks for your review! I didn't find this header is included implicitly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK. How about the following?
diff --git a/java/dataset/src/main/cpp/jni_wrapper.cc b/java/dataset/src/main/cpp/jni_wrapper.cc
index 19a43c8d2f..f1819aab0b 100644
--- a/java/dataset/src/main/cpp/jni_wrapper.cc
+++ b/java/dataset/src/main/cpp/jni_wrapper.cc
@@ -25,9 +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"
-#include "arrow/filesystem/s3fs.h"
#include "arrow/engine/substrait/util.h"
#include "arrow/engine/substrait/serde.h"
#include "arrow/engine/substrait/relation.h"arrow/filesystem/api.h includes arrow/util/config.h explicitly and ARROW_S3 must be defined if S3 is enabled with arrow/filesystem/api.h.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kou, by including arrow/filesystem/api.h, a few extra headers are directly or indirectly included, but they are not actually used here. Can we just keep the current change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we want to keep the current style, we need to include arrow/util/config.h explicitly before we use ARROW_S3.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kou, I just realized what you meant. The code was updated. Thanks!
kou
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
Thanks for checking it.
|
After merging your PR, Conbench analyzed the 6 benchmarking runs that have been run so far on merge-commit 052c330. There were no benchmark performance regressions. 🎉 The full Conbench report has more details. It also includes information about 76 possible false positives for unstable benchmarks that are known to sometimes produce them. |
apache#41837) ### Rationale for this change Fix undefined symbol error reported at runtime after ARROW_S3=OFF is used in compiling arrow Java. ### What changes are included in this PR? ### Are these changes tested? Tested in my local. Not sure whether we need to add some test. ### Are there any user-facing changes? No. * GitHub Issue: apache#41836 Authored-by: PHILO-HE <feilong.he@intel.com> Signed-off-by: Sutou Kouhei <kou@clear-code.com>
Rationale for this change
Fix undefined symbol error reported at runtime after ARROW_S3=OFF is used in compiling arrow Java.
What changes are included in this PR?
Are these changes tested?
Tested in my local. Not sure whether we need to add some test.
Are there any user-facing changes?
No.