Skip to content

Commit

Permalink
remove cloud mode
Browse files Browse the repository at this point in the history
  • Loading branch information
924060929 committed Apr 18, 2024
1 parent 5cadcd0 commit 9a1b67e
Showing 1 changed file with 1 addition and 35 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,8 @@ suite("parse_sql_from_sql_cache") {
sql "select * from test_use_plan_cache2"
assertHasCache "select * from test_use_plan_cache2"

// NOTE: in cloud mode, add empty partition can not use cache, because the table version already update,
// but in native mode, add empty partition can use cache
sql "alter table test_use_plan_cache2 add partition p6 values[('6'),('7'))"
if (isCloudMode()) {
assertNoCache "select * from test_use_plan_cache2"
} else {
assertHasCache "select * from test_use_plan_cache2"
}
assertHasCache "select * from test_use_plan_cache2"

// insert data can not use cache
sql "insert into test_use_plan_cache2 values(6, 1)"
Expand Down Expand Up @@ -284,13 +278,6 @@ suite("parse_sql_from_sql_cache") {
sql "create user test_cache_user1 identified by 'DORIS@2024'"
def dbName = context.config.getDbNameByFile(context.file)
sql """GRANT SELECT_PRIV ON *.* TO test_cache_user1"""
//cloud-mode
if (isCloudMode()) {
def clusters = sql " SHOW CLUSTERS; "
assertTrue(!clusters.isEmpty())
def validCluster = clusters[0][0]
sql """GRANT USAGE_PRIV ON CLUSTER ${validCluster} TO test_cache_user1"""
}

createTestTable "test_use_plan_cache12"

Expand Down Expand Up @@ -329,13 +316,6 @@ suite("parse_sql_from_sql_cache") {
sql "drop user if exists test_cache_user2"
sql "create user test_cache_user2 identified by 'DORIS@2024'"
sql """GRANT SELECT_PRIV ON *.* TO test_cache_user2"""
//cloud-mode
if (isCloudMode()) {
def clusters = sql " SHOW CLUSTERS; "
assertTrue(!clusters.isEmpty())
def validCluster = clusters[0][0]
sql """GRANT USAGE_PRIV ON CLUSTER ${validCluster} TO test_cache_user2"""
}

createTestTable "test_use_plan_cache13"

Expand Down Expand Up @@ -387,13 +367,6 @@ suite("parse_sql_from_sql_cache") {
sql "drop user if exists test_cache_user3"
sql "create user test_cache_user3 identified by 'DORIS@2024'"
sql """GRANT SELECT_PRIV ON *.* TO test_cache_user3"""
//cloud-mode
if (isCloudMode()) {
def clusters = sql " SHOW CLUSTERS; "
assertTrue(!clusters.isEmpty())
def validCluster = clusters[0][0]
sql """GRANT USAGE_PRIV ON CLUSTER ${validCluster} TO test_cache_user3"""
}

createTestTable "test_use_plan_cache14"

Expand Down Expand Up @@ -452,13 +425,6 @@ suite("parse_sql_from_sql_cache") {
sql "create user test_cache_user4 identified by 'DORIS@2024'"
sql "GRANT SELECT_PRIV ON regression_test.* TO test_cache_user4"
sql "GRANT SELECT_PRIV ON ${dbName}.test_use_plan_cache15 TO test_cache_user4"
//cloud-mode
if (isCloudMode()) {
def clusters = sql " SHOW CLUSTERS; "
assertTrue(!clusters.isEmpty())
def validCluster = clusters[0][0]
sql """GRANT USAGE_PRIV ON CLUSTER ${validCluster} TO test_cache_user4"""
}

extraThread("test_cache_user4_thread", {
connect(user = "test_cache_user4", password="DORIS@2024") {
Expand Down

0 comments on commit 9a1b67e

Please sign in to comment.