From 42646119fe5129ca3fbdb3a7b73d9d698ed396e5 Mon Sep 17 00:00:00 2001 From: "Lei, HUANG" <6406592+v0y4g3r@users.noreply.github.com> Date: Mon, 19 Aug 2024 16:04:54 +0800 Subject: [PATCH] fix(sqlness): redact all volatile text (#4583) Commit Message: Add SQLNESS replacements for RoundRobinBatch and region patterns --- .../explain/analyze_append_table_count.result | 24 +++++++++++-------- .../explain/analyze_append_table_count.sql | 4 ++++ 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/tests/cases/distributed/explain/analyze_append_table_count.result b/tests/cases/distributed/explain/analyze_append_table_count.result index 7a2a1603f205..d08f7627fb0e 100644 --- a/tests/cases/distributed/explain/analyze_append_table_count.result +++ b/tests/cases/distributed/explain/analyze_append_table_count.result @@ -18,17 +18,21 @@ WITH( Affected Rows: 0 -- SQLNESS REPLACE (metrics.*) REDACTED +-- SQLNESS REPLACE (RoundRobinBatch.*) REDACTED +-- SQLNESS REPLACE (-+) - +-- SQLNESS REPLACE (\s\s+) _ -- SQLNESS REPLACE (peers.*) REDACTED +-- SQLNESS REPLACE region=\d+\(\d+,\s+\d+\) region=REDACTED EXPLAIN ANALYZE SELECT count(*) FROM test_table; -+-------+------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| stage | node | plan | -+-------+------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| 0 | 0 | MergeScanExec: REDACTED -| | | | -| 1 | 0 | ProjectionExec: expr=[0 as COUNT(test_table.timestamp)] REDACTED -| | | common_recordbatch::adapter::MetricCollector REDACTED -| | | | -| | | Total rows: 1 | -+-------+------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ ++-+-+-+ +| stage | node | plan_| ++-+-+-+ +| 0_| 0_|_MergeScanExec: REDACTED +|_|_|_| +| 1_| 0_|_ProjectionExec: expr=[0 as COUNT(test_table.timestamp)] REDACTED +|_|_|_common_recordbatch::adapter::MetricCollector REDACTED +|_|_|_| +|_|_| Total rows: 1_| ++-+-+-+ diff --git a/tests/cases/distributed/explain/analyze_append_table_count.sql b/tests/cases/distributed/explain/analyze_append_table_count.sql index fedf18dfa887..a47fc9927533 100644 --- a/tests/cases/distributed/explain/analyze_append_table_count.sql +++ b/tests/cases/distributed/explain/analyze_append_table_count.sql @@ -17,5 +17,9 @@ WITH( ); -- SQLNESS REPLACE (metrics.*) REDACTED +-- SQLNESS REPLACE (RoundRobinBatch.*) REDACTED +-- SQLNESS REPLACE (-+) - +-- SQLNESS REPLACE (\s\s+) _ -- SQLNESS REPLACE (peers.*) REDACTED +-- SQLNESS REPLACE region=\d+\(\d+,\s+\d+\) region=REDACTED EXPLAIN ANALYZE SELECT count(*) FROM test_table;