Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

branch-2.1: [fix](regression)Fix unstable delta rows case. #43928 #43988

Open
wants to merge 1 commit into
base: branch-2.1
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 28 additions & 8 deletions regression-test/suites/nereids_p0/delta_row/delta_row.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -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) )
}
}
}

Loading