This is an automated email from the ASF dual-hosted git repository.
apitrou pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow.git
The following commit(s) were added to refs/heads/main by this push:
new 41e45fed07 GH-38697: [C++][Gandiva] Use arrow io util to replace
std::filesystem::path in gandiva (#38698)
41e45fed07 is described below
commit 41e45fed07a6466b1f8e9437220c9bf49c4a8cb3
Author: Yue <[email protected]>
AuthorDate: Thu Nov 16 00:22:36 2023 +0800
GH-38697: [C++][Gandiva] Use arrow io util to replace std::filesystem::path
in gandiva (#38698)
### Rationale for this change
AlmaLinux 8 CI reported linker failure when `std::filesystem::path` is
used, and This PR tries to it.
### What changes are included in this PR?
Replace replace `std::filesystem::path` in gandiva with arrow's internal io
util so that AlmaLinux 8 CI build can work.
### Are these changes tested?
It should be covered by existing tests and CI.
### Are there any user-facing changes?
No
* Closes: #38697
Lead-authored-by: Yue Ni <[email protected]>
Co-authored-by: Yue <[email protected]>
Co-authored-by: Antoine Pitrou <[email protected]>
Co-authored-by: Antoine Pitrou <[email protected]>
Signed-off-by: Antoine Pitrou <[email protected]>
---
cpp/src/gandiva/tests/test_util.cc | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/cpp/src/gandiva/tests/test_util.cc
b/cpp/src/gandiva/tests/test_util.cc
index 42f67d3824..4a0a15c722 100644
--- a/cpp/src/gandiva/tests/test_util.cc
+++ b/cpp/src/gandiva/tests/test_util.cc
@@ -17,12 +17,12 @@
#include "gandiva/tests/test_util.h"
-#include <filesystem>
+#include "arrow/util/io_util.h"
+#include "arrow/util/logging.h"
namespace gandiva {
std::shared_ptr<Configuration> TestConfiguration() {
- auto builder = ConfigurationBuilder();
- return builder.DefaultConfiguration();
+ return ConfigurationBuilder::DefaultConfiguration();
}
#ifndef GANDIVA_EXTENSION_TEST_DIR
@@ -30,9 +30,10 @@ std::shared_ptr<Configuration> TestConfiguration() {
#endif
std::string GetTestFunctionLLVMIRPath() {
- std::filesystem::path base(GANDIVA_EXTENSION_TEST_DIR);
- std::filesystem::path ir_file = base / "multiply_by_two.bc";
- return ir_file.string();
+ const auto base =
+
arrow::internal::PlatformFilename::FromString(GANDIVA_EXTENSION_TEST_DIR);
+ DCHECK_OK(base.status());
+ return base->Join("multiply_by_two.bc")->ToString();
}
NativeFunction GetTestExternalFunction() {