diff --git a/QueryEngine/HashJoinRuntime.cpp b/QueryEngine/HashJoinRuntime.cpp index 601956e27c7..1494731f747 100644 --- a/QueryEngine/HashJoinRuntime.cpp +++ b/QueryEngine/HashJoinRuntime.cpp @@ -123,12 +123,13 @@ DEVICE void store_payload(int32_t* hash_entry, int64_t val = fixed_width_int_decode_noinline(payload[p].col_buff, payload[p].elem_sz, pos); int32_t* pos = hash_entry + payload[p].payload_offs; - if (payload[p].payload_size == 1) + if (payload[p].payload_size == 1) { *pos = (int32_t)val; - else if (payload[p].payload_size == 2) + } else if (payload[p].payload_size == 2) { *(int64_t*)pos = val; - else + } else { CHECK(false); + } } } #endif diff --git a/QueryEngine/IRCodegen.cpp b/QueryEngine/IRCodegen.cpp index 7d6a30ccf0b..35829e5659f 100644 --- a/QueryEngine/IRCodegen.cpp +++ b/QueryEngine/IRCodegen.cpp @@ -230,8 +230,9 @@ std::vector Executor::buildJoinLoops( auto* desc = get_column_descriptor_maybe(*col, cat); if (desc && !desc->isSystemCol && !desc->isVirtualCol && !desc->isDeletedCol && !desc->columnType.get_physical_cols() && !desc->columnType.is_varlen() && - (desc->columnType.get_size() <= 8)) + (desc->columnType.get_size() <= 8)) { payload_cols[col->getScanDesc().getNestLevel()].push_back(col); + } } } for (size_t level_idx = 0, current_hash_table_idx = 0; @@ -493,8 +494,9 @@ void Executor::addPayloadColumnIterators(const JoinHashTableInterface& hash_tabl void Executor::codegenPayloadColumnIterators(const std::vector& prev_iters, const JoinHashTableInterface& hash_table) { - if (hash_table.getPayloadType() == JoinHashTableInterface::PayloadType::RowId) + if (hash_table.getPayloadType() == JoinHashTableInterface::PayloadType::RowId) { return; + } CHECK(!prev_iters.empty()); auto payload_ptr = prev_iters.back(); diff --git a/QueryEngine/JoinHashTable.cpp b/QueryEngine/JoinHashTable.cpp index d21f1896ce1..2899e01d58f 100644 --- a/QueryEngine/JoinHashTable.cpp +++ b/QueryEngine/JoinHashTable.cpp @@ -398,8 +398,9 @@ std::shared_ptr JoinHashTable::getInstance( } } } catch (const OutOfMemory&) { - if (payload_cols.empty()) + if (payload_cols.empty()) { throw; + } payload_cols.clear(); join_hash_table = @@ -692,8 +693,9 @@ void JoinHashTable::tryReify(const int device_count, bool throw_out_of_memory) { throw HashJoinFail(std::string("Could not build hash tables for equijoin | ") + e.what()); } catch (const OutOfMemory& e) { - if (throw_out_of_memory) + if (throw_out_of_memory) { throw; + } throw HashJoinFail( std::string("Ran out of memory while building hash tables for equijoin | ") + e.what()); diff --git a/QueryEngine/LoopControlFlow/JoinLoop.cpp b/QueryEngine/LoopControlFlow/JoinLoop.cpp index eea109d1dd5..82ab501dccb 100644 --- a/QueryEngine/LoopControlFlow/JoinLoop.cpp +++ b/QueryEngine/LoopControlFlow/JoinLoop.cpp @@ -103,8 +103,9 @@ llvm::BasicBlock* JoinLoop::codegen( iteration_val = builder.CreateGEP(iteration_domain.values_buffer, offs); } iterators.push_back(iteration_val); - if (join_loop.payload_iterators_codegen_) + if (join_loop.payload_iterators_codegen_) { join_loop.payload_iterators_codegen_(iterators); + } const auto have_more_inner_rows = builder.CreateICmpSLT( iteration_counter, join_loop.kind_ == JoinLoopKind::UpperBound ? iteration_domain.upper_bound @@ -168,8 +169,9 @@ llvm::BasicBlock* JoinLoop::codegen( const auto iteration_domain = join_loop.iteration_domain_codegen_(iterators); CHECK(!iteration_domain.values_buffer); iterators.push_back(iteration_domain.slot_lookup_result); - if (join_loop.payload_iterators_codegen_) + if (join_loop.payload_iterators_codegen_) { join_loop.payload_iterators_codegen_(iterators); + } auto match_found = builder.CreateICmpSGE(iteration_domain.slot_lookup_result, ll_int(0, context)); if (join_loop.is_deleted_) {