Skip to content

Commit

Permalink
Troubleshoot CI failure.
Browse files Browse the repository at this point in the history
  • Loading branch information
niyue committed Dec 7, 2023
1 parent 4e84a7e commit d055df3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion cpp/src/gandiva/engine.cc
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,8 @@ Status Engine::FinalizeModule() {
}

Result<void*> Engine::CompiledFunction(std::string& function) {
DCHECK(module_finalized_);
DCHECK(module_finalized_)
<< "module must be finalized before getting compiled function";
auto sym = lljit_->lookup(function);
if (!sym) {
return Status::CodeGenError("Failed to look up function: " + function +
Expand Down
4 changes: 3 additions & 1 deletion cpp/src/gandiva/llvm_generator_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,9 @@ TEST_F(TestLLVMGenerator, TestAdd) {
EXPECT_THAT(ir, testing::HasSubstr("vector.body"));

EXPECT_OK_AND_ASSIGN(auto fn_ptr, generator->engine_->CompiledFunction(fn_name));
auto eval_func = (EvalFunc)fn_ptr;
EXPECT_NE(fn_ptr, nullptr);

auto eval_func = (EvalFunc)fn_ptr;
constexpr size_t kNumRecords = 4;
std::array<uint32_t, kNumRecords> a0{1, 2, 3, 4};
std::array<uint32_t, kNumRecords> a1{5, 6, 7, 8};
Expand All @@ -125,6 +126,7 @@ TEST_F(TestLLVMGenerator, TestAdd) {
reinterpret_cast<uint8_t*>(out.data()), reinterpret_cast<uint8_t*>(&out_bitmap),
};
std::array<int64_t, 6> addr_offsets{0, 0, 0, 0, 0, 0};

eval_func(addrs.data(), addr_offsets.data(), nullptr, nullptr, nullptr,
0 /* dummy context ptr */, kNumRecords);

Expand Down

0 comments on commit d055df3

Please sign in to comment.