Skip to content

Commit

Permalink
Merge pull request duckdb#10202 from Tishj/sorted_aggregate_function_…
Browse files Browse the repository at this point in the history
…small_vector_size

[Dev] Fix triggered assertion in `SortedAggregateState::FlushChunks` caused by a small STANDARD_VECTOR_SIZE
  • Loading branch information
Mytherin authored Feb 12, 2024
2 parents 3603860 + 1cd1ede commit b985c34
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/function/aggregate/sorted_aggregate_function.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ struct SortedAggregateState {
using LinkedChunkFunctions = vector<ListSegmentFunctions>;

//! Capacities of the various levels of buffering
static const idx_t LIST_CAPACITY = 16;
static const idx_t CHUNK_CAPACITY = STANDARD_VECTOR_SIZE;
static const idx_t LIST_CAPACITY = MinValue<idx_t>(16, CHUNK_CAPACITY);

SortedAggregateState() : count(0), nsel(0), offset(0) {
}
Expand Down
2 changes: 1 addition & 1 deletion src/include/duckdb/common/helper.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ static duckdb::unique_ptr<T> make_unique(_Args&&... __args) {
}

template <typename T>
T MaxValue(T a, T b) {
constexpr T MaxValue(T a, T b) {
return a > b ? a : b;
}

Expand Down

0 comments on commit b985c34

Please sign in to comment.