Skip to content

Commit

Permalink
[branch-30](ut) fix window_funnel UT failure (#48724)
Browse files Browse the repository at this point in the history
### What problem does this PR solve?
Problem Summary:
fix window_funnel UT failure
### Release note
  • Loading branch information
zhangstar333 authored Mar 6, 2025
1 parent 49ed7c8 commit 5989c2b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions be/test/vec/aggregate_functions/vec_window_funnel_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -148,10 +148,15 @@ TEST_F(VWindowFunnelTest, testSerialize) {
agg_function->add(place, column, i, nullptr);
}

ColumnVector<Int32> column_result;
agg_function->insert_result_into(place, column_result);
EXPECT_EQ(column_result.get_data()[0], 3);

ColumnString buf;
VectorBufferWriter buf_writer(buf);
agg_function->serialize(place, buf_writer);
buf_writer.commit();
agg_function->destroy(place);

std::unique_ptr<char[]> memory2(new char[agg_function->size_of_data()]);
AggregateDataPtr place2 = memory2.get();
Expand All @@ -160,11 +165,6 @@ TEST_F(VWindowFunnelTest, testSerialize) {
VectorBufferReader buf_reader(buf.get_data_at(0));
agg_function->deserialize(place2, buf_reader, nullptr);

ColumnVector<Int32> column_result;
agg_function->insert_result_into(place, column_result);
EXPECT_EQ(column_result.get_data()[0], 3);
agg_function->destroy(place);

ColumnVector<Int32> column_result2;
agg_function->insert_result_into(place2, column_result2);
EXPECT_EQ(column_result2.get_data()[0], 3);
Expand Down

0 comments on commit 5989c2b

Please sign in to comment.