Skip to content
This repository was archived by the owner on May 9, 2024. It is now read-only.

Commit eb39cc2

Browse files
committed
Cast slot index to match slot offset for columnar output
1 parent 9fa39ad commit eb39cc2

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

omniscidb/QueryEngine/TargetExprBuilder.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,11 @@ void TargetExprCodegen::codegen(
160160
CHECK_EQ(size_t(0), col_off % chosen_bytes);
161161
col_off /= chosen_bytes;
162162
CHECK(std::get<1>(agg_out_ptr_w_idx));
163-
auto offset =
164-
LL_BUILDER.CreateAdd(std::get<1>(agg_out_ptr_w_idx), LL_INT(col_off));
163+
const auto casted_out_ptr_idx =
164+
LL_BUILDER.CreateCast(llvm::Instruction::CastOps::SExt,
165+
std::get<1>(agg_out_ptr_w_idx),
166+
llvm::Type::getInt64Ty(LL_CONTEXT));
167+
auto offset = LL_BUILDER.CreateAdd(casted_out_ptr_idx, LL_INT(col_off));
165168
auto* bit_cast = LL_BUILDER.CreateBitCast(
166169
std::get<0>(agg_out_ptr_w_idx),
167170
llvm::PointerType::get(

0 commit comments

Comments
 (0)