Skip to content

Commit 581bc03

Browse files
stdpainHappenLee
authored andcommitted
fix serialize error (apache#18)
1 parent c8ab31b commit 581bc03

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

‎be/src/vec/exec/vaggregation_node.cpp‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -266,8 +266,10 @@ Status AggregationNode::_serialize_without_key(RuntimeState* state, Block* block
266266
for (int i = 0; i < _aggregate_evaluators.size(); ++i) {
267267
_aggregate_evaluators[i]->function()->serialize(
268268
_agg_data.without_key + _offsets_of_aggregate_states[i], buf);
269-
value_columns[i]->insertData(buf.str().c_str(), buf.str().length());
270-
buf.str().clear();
269+
auto str_buffer = buf.str();
270+
value_columns[i]->insertData(str_buffer.c_str(), str_buffer.length());
271+
buf.str("");
272+
buf.clear();
271273
}
272274
{
273275
ColumnsWithTypeAndName data_with_schema;

0 commit comments

Comments
 (0)