Skip to content

Commit

Permalink
Fix test_column_ops test
Browse files Browse the repository at this point in the history
  • Loading branch information
w41ter committed Sep 30, 2024
1 parent 7bf0575 commit 86c284f
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions regression-test/suites/table-sync/test_column_ops.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,11 @@ suite("test_column_ops") {
// assertTrue(checkSelectRowTimesOf("SELECT * FROM ${tableName} WHERE test=${test_num}",
// 1, 30))

def versions = sql_return_maparray "show variables like 'version_comment'"
if (versions[0].Value.contains('doris-2.0.') || versions[0].Value.contains('doris-2.1')) {
logger.info("2.0/2.1 not support rename column, current version is: ${versions[0].Value}")
return
}

logger.info("=== Test 4: rename column case ===")
test_num = 4
Expand All @@ -113,10 +118,8 @@ suite("test_column_ops") {
INSERT INTO ${tableName} VALUES (${test_num}, 0, "666")
"""
sql "sync"
assertTrue(helper.checkSelectRowTimesOf("SELECT * FROM ${tableName} WHERE test=${test_num}",
1, 30))
assertTrue(helper.checkSelectRowTimesOf("SELECT * FROM ${tableName} WHERE test=${test_num} AND _cost='666'",
1, 1))
assertTrue(helper.checkSelectTimesOf("SELECT * FROM ${tableName} WHERE test=${test_num}", 1, 30))
assertTrue(helper.checkSelectTimesOf("SELECT * FROM ${tableName} WHERE test=${test_num} AND _cost='666'", 1, 1))


logger.info("=== Test 5: drop column case ===")
Expand Down

0 comments on commit 86c284f

Please sign in to comment.