This is an automated email from the ASF dual-hosted git repository.
lijibing pushed a commit to branch branch-2.1
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-2.1 by this push:
new 02bb36c2814 branch-2.1: [fix](regression)Fix unstable delta rows case.
#43928 (#43988)
02bb36c2814 is described below
commit 02bb36c28147699dab78c9d3119ff224ede40a08
Author: github-actions[bot]
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Fri Nov 15 11:42:57 2024 +0800
branch-2.1: [fix](regression)Fix unstable delta rows case. #43928 (#43988)
Cherry-picked from #43928
Co-authored-by: James <[email protected]>
---
.../suites/nereids_p0/delta_row/delta_row.groovy | 36 +++++++++++++++++-----
1 file changed, 28 insertions(+), 8 deletions(-)
diff --git a/regression-test/suites/nereids_p0/delta_row/delta_row.groovy
b/regression-test/suites/nereids_p0/delta_row/delta_row.groovy
index c6f40f5363f..c788cf57b0d 100644
--- a/regression-test/suites/nereids_p0/delta_row/delta_row.groovy
+++ b/regression-test/suites/nereids_p0/delta_row/delta_row.groovy
@@ -42,14 +42,34 @@ suite("delta_row") {
sql "set global enable_auto_analyze=false;"
sql "insert into t values (10, 'c');"
- explain {
- sql "physical plan select * from t where k > 6"
- contains("stats=0.5,")
- contains("stats=5(1)")
- notContains("stats=0,")
- notContains("stats=4 ")
+ def result = sql """explain physical plan select * from t where k > 6"""
+ logger.info("result:" + result)
+ def stringResult = ""
+ for (int i = 0; i < result.size(); i++) {
+ stringResult += result[i]
+ }
+ logger.info("stringResult:" + stringResult)
+ if (stringResult.contains("stats=5(1)")) {
+ logger.info("rows not reported, test analyze rows + delta rows")
+ assertTrue(stringResult.contains("stats=0.5,"))
+ assertFalse(stringResult.contains("stats=0,"))
+ assertFalse(stringResult.contains("stats=4 "))
+ } else {
+ logger.info("rows reported, test use reported rows.")
+ result = sql """show index stats t t"""
+ logger.info("index stats: " + result)
+ assertEquals(1, result.size())
+ assertNotEquals("-1", result[0][4])
+ }
+// explain {
+// sql "physical plan select * from t where k > 6"
+// contains("stats=0.5,")
+// contains("stats=5(1)")
+// notContains("stats=0,")
+// notContains("stats=4 ")
+// cost = 5.00002
// PhysicalResultSink[75] ( outputExprs=[k#0, v#1] )
// +--PhysicalFilter[72]@1 ( stats=0.5, predicates=(k#0 > 6) )
// +--PhysicalOlapScan[t]@0 ( stats=5(1) )
- }
-}
\ No newline at end of file
+}
+
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]