Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions be/src/olap/memtable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -468,10 +468,7 @@ void MemTable::shrink_memtable_by_agg() {
return;
}
size_t same_keys_num = _sort();
if (same_keys_num == 0) {
vectorized::Block in_block = _input_mutable_block.to_block();
_put_into_output(in_block);
} else {
if (same_keys_num != 0) {
_aggregate<false>();
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,8 @@ suite("test_insert_with_aggregation_memtable", "nonConcurrent") {
sql """INSERT INTO ${table_name} SELECT k, v from ${table_name}"""
createMV("""create materialized view var_cnt as select k, count(k) from ${table_name} group by k""")
sql """INSERT INTO ${table_name} SELECT k, v from ${table_name} limit 8101"""
// insert with no duplicate
sql """INSERT INTO ${table_name} SELECT *, '{"k1":1, "k2": "hello world", "k3" : [1234], "k4" : 1.10000, "k5" : [[123]]}' FROM numbers("number" = "4096"); """

reset_be_param("enable_shrink_memory")
reset_be_param("write_buffer_size_for_agg")
Expand Down