From 98b810e564a8f9c245a619976ad04c8b84b639c8 Mon Sep 17 00:00:00 2001 From: stdpain <34912776+stdpain@users.noreply.github.com> Date: Fri, 14 Feb 2025 21:28:48 +0800 Subject: [PATCH] [UT] Fix ASAN compile error and unstable UT (#55923) Signed-off-by: stdpain --- .../pipeline/aggregate/aggregate_streaming_sink_operator.h | 1 + .../R/test_topn_filter_throttle_scan | 5 ++++- .../T/test_topn_filter_throttle_scan | 3 ++- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/be/src/exec/pipeline/aggregate/aggregate_streaming_sink_operator.h b/be/src/exec/pipeline/aggregate/aggregate_streaming_sink_operator.h index 2eba42c087b43c..d4164ac4c53ab0 100644 --- a/be/src/exec/pipeline/aggregate/aggregate_streaming_sink_operator.h +++ b/be/src/exec/pipeline/aggregate/aggregate_streaming_sink_operator.h @@ -77,6 +77,7 @@ class AggregateStreamingSinkOperator : public Operator { AggrAutoState _auto_state{}; AggrAutoContext _auto_context; LimitedMemAggState _limited_mem_state; + DECLARE_ONCE_DETECTOR(_set_finishing_once); }; class AggregateStreamingSinkOperatorFactory final : public OperatorFactory { diff --git a/test/sql/test_topn_filter_throttle_scan/R/test_topn_filter_throttle_scan b/test/sql/test_topn_filter_throttle_scan/R/test_topn_filter_throttle_scan index 7104955aedb641..d374389af3983a 100644 --- a/test/sql/test_topn_filter_throttle_scan/R/test_topn_filter_throttle_scan +++ b/test/sql/test_topn_filter_throttle_scan/R/test_topn_filter_throttle_scan @@ -50,7 +50,10 @@ set topn_filter_back_pressure_mode='2'; set enable_profile='true'; -- result: -- !result -[UC]select t0.c1, repeat('x', t0.c1+t1.c1) as a, repeat('y',t1.c0 + t1.c0) as b from t0 join[broadcast] t1 on t0.c0 = t1.c0 order by 1 limit 10; +set enable_async_profile=false; +-- result: +-- !result +[UC]select t0.c1, repeat('x', t0.c1+t1.c1) as a, repeat('y',t1.c0 + t1.c0) as b from t0 join[broadcast] t1 on t0.c0 = t1.c0 order by 1 limit 10; -- result: 0 xxxxxxx yy 0 xxxxxxxxx yy diff --git a/test/sql/test_topn_filter_throttle_scan/T/test_topn_filter_throttle_scan b/test/sql/test_topn_filter_throttle_scan/T/test_topn_filter_throttle_scan index 7f2c53590910b8..67c0aceb6538d3 100644 --- a/test/sql/test_topn_filter_throttle_scan/T/test_topn_filter_throttle_scan +++ b/test/sql/test_topn_filter_throttle_scan/T/test_topn_filter_throttle_scan @@ -34,6 +34,7 @@ insert into t0 select t0.* from t0, Table(generate_series(1,10)); insert into t1 select c0, c1 from Table(generate_series(1,10000)) ta(c0), Table(generate_series(1,10)) tb(c1); set topn_filter_back_pressure_mode='2'; set enable_profile='true'; -[UC]select t0.c1, repeat('x', t0.c1+t1.c1) as a, repeat('y',t1.c0 + t1.c0) as b from t0 join[broadcast] t1 on t0.c0 = t1.c0 order by 1 limit 10; +set enable_async_profile=false; +[UC]select t0.c1, repeat('x', t0.c1+t1.c1) as a, repeat('y',t1.c0 + t1.c0) as b from t0 join[broadcast] t1 on t0.c0 = t1.c0 order by 1 limit 10; create table profile_table properties("replication_num"="1") as select line from table(unnest(split(get_query_profile(last_query_id()),"\n"))) t(line); select assert_true(count(1)>0) from profile_table where line like '%TopnRuntimeFilter%';