Skip to content
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

GH-38697: [C++][Gandiva] Use arrow io util to replace std::filesystem::path in gandiva #38698

Merged
merged 3 commits into from
Nov 15, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions cpp/src/gandiva/tests/test_util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,23 @@

#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();
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Previously this DefaultConfiguration function is called by creating a new instance of ConfigurationBuilder, but I think this is not necessary since it is a static function of ConfigurationBuilder, so I change it as well.

}

#ifndef GANDIVA_EXTENSION_TEST_DIR
#define GANDIVA_EXTENSION_TEST_DIR "."
#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(base.ok());
niyue marked this conversation as resolved.
Show resolved Hide resolved
return base->Join("multiply_by_two.bc")->ToString();
}

NativeFunction GetTestExternalFunction() {
Expand Down
Loading