Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
akuzm committed Oct 22, 2024
1 parent c18ded9 commit c723a5a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 18 deletions.
4 changes: 3 additions & 1 deletion tsl/src/nodes/vector_agg/function/agg_many_vector_helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,11 @@ FUNCTION_NAME(many_vector_impl)(void *restrict agg_states, const uint32 *offsets
for (int row = start_row; row < end_row; row++)
{
const CTYPE value = values[row];
FUNCTION_NAME(state) *restrict state = &states[offsets[row]];
if (arrow_row_is_valid(filter, row))
{
FUNCTION_NAME(one)(&states[offsets[row]], value);
Assert(offsets[row] != 0);
FUNCTION_NAME(one)(state, value);
}
}
MemoryContextSwitchTo(old);
Expand Down
20 changes: 3 additions & 17 deletions tsl/src/nodes/vector_agg/hash_table_functions_impl.c
Original file line number Diff line number Diff line change
Expand Up @@ -171,30 +171,16 @@ FUNCTION_NAME(fill_offsets)(GroupingPolicyHash *policy, DecompressBatchState *ba
CompressedColumnValues column = batch_state->compressed_columns[g->input_offset];
const uint64 *restrict filter = batch_state->vector_qual_result;

if (filter == NULL && column.buffers[0] == NULL)
if (filter == NULL)
{
next_unused_state_index = FUNCTION_NAME(
dispatch_type)(policy, column, filter, next_unused_state_index, start_row, end_row);
dispatch_type)(policy, column, NULL, next_unused_state_index, start_row, end_row);
}
else if (filter != NULL && column.buffers[0] == NULL)
{
next_unused_state_index = FUNCTION_NAME(
dispatch_type)(policy, column, filter, next_unused_state_index, start_row, end_row);
}
else if (filter == NULL && column.buffers[0] != NULL)
{
next_unused_state_index = FUNCTION_NAME(
dispatch_type)(policy, column, filter, next_unused_state_index, start_row, end_row);
}
else if (filter != NULL && column.buffers[0] != NULL)
else
{
next_unused_state_index = FUNCTION_NAME(
dispatch_type)(policy, column, filter, next_unused_state_index, start_row, end_row);
}
else
{
Assert(false);
}

return next_unused_state_index;
}
Expand Down

0 comments on commit c723a5a

Please sign in to comment.