diff --git a/src/common/types/row/tuple_data_scatter_gather.cpp b/src/common/types/row/tuple_data_scatter_gather.cpp index ba150a7aa4f..e707941d0ea 100644 --- a/src/common/types/row/tuple_data_scatter_gather.cpp +++ b/src/common/types/row/tuple_data_scatter_gather.cpp @@ -100,7 +100,7 @@ void TupleDataCollection::ComputeHeapSizes(TupleDataChunkState &chunk_state, con ResetCombinedListData(chunk_state.vector_data); auto heap_sizes = FlatVector::GetData(chunk_state.heap_sizes); - std::fill_n(heap_sizes, new_chunk.size(), 0); + std::fill_n(heap_sizes, append_count, 0); for (idx_t col_idx = 0; col_idx < new_chunk.ColumnCount(); col_idx++) { auto &source_v = new_chunk.data[col_idx]; @@ -596,7 +596,9 @@ void TupleDataCollection::Scatter(TupleDataChunkState &chunk_state, const DataCh const auto heap_sizes = FlatVector::GetData(chunk_state.heap_sizes); const auto offset_heap_locations = FlatVector::GetData(chunk_state.heap_locations); for (idx_t i = 0; i < append_count; i++) { - D_ASSERT(offset_heap_locations[i] == original_heap_locations[i] + heap_sizes[i]); + if (heap_sizes[i] != 0) { + D_ASSERT(offset_heap_locations[i] == original_heap_locations[i] + heap_sizes[i]); + } } } #endif diff --git a/src/execution/expression_executor.cpp b/src/execution/expression_executor.cpp index 8c70ca22173..716672d86a3 100644 --- a/src/execution/expression_executor.cpp +++ b/src/execution/expression_executor.cpp @@ -249,7 +249,7 @@ static inline idx_t DefaultSelectLoop(const SelectionVector *bsel, const uint8_t for (idx_t i = 0; i < count; i++) { auto bidx = bsel->get_index(i); auto result_idx = sel->get_index(i); - if (bdata[bidx] > 0 && (NO_NULL || mask.RowIsValid(bidx))) { + if ((NO_NULL || mask.RowIsValid(bidx)) && bdata[bidx] > 0) { if (HAS_TRUE_SEL) { true_sel->set_index(true_count++, result_idx); } diff --git a/src/parallel/executor.cpp b/src/parallel/executor.cpp index de9243cb316..ee0b0f8b8fb 100644 --- a/src/parallel/executor.cpp +++ b/src/parallel/executor.cpp @@ -282,9 +282,6 @@ void Executor::VerifyScheduledEvents(const ScheduleEventData &event_data) { void Executor::VerifyScheduledEventsInternal(const idx_t vertex, const vector> &vertices, vector &visited, vector &recursion_stack) { D_ASSERT(!recursion_stack[vertex]); // this vertex is in the recursion stack: circular dependency! - if (recursion_stack[vertex]) { - throw InternalException("oops"); - } if (visited[vertex]) { return; // early out: we already visited this vertex } @@ -678,8 +675,8 @@ bool Executor::GetPipelinesProgress(double ¤t_progress, uint64_t ¤t_ total_cardinality = 0; current_cardinality = 0; for (auto &pipeline : pipelines) { - double child_percentage = 0; - idx_t child_cardinality = 0; + double child_percentage; + idx_t child_cardinality; if (!pipeline->GetProgress(child_percentage, child_cardinality)) { return false;