This is an automated email from the ASF dual-hosted git repository.
yiguolei pushed a commit to branch branch-4.1
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-4.1 by this push:
new 258504a6024 branch-4.1: [fix](regression-test) disable some unstable
cases (#62357)
258504a6024 is described below
commit 258504a60241343f5e9b60ad44b360eb3f22329d
Author: Socrates <[email protected]>
AuthorDate: Sat Apr 11 23:22:33 2026 +0800
branch-4.1: [fix](regression-test) disable some unstable cases (#62357)
### What problem does this PR solve?
Issue Number: close #xxx
Related PR: #xxx
Problem Summary:
### Release note
None
### Check List (For Author)
- Test <!-- At least one of them must be included. -->
- [ ] Regression test
- [ ] Unit Test
- [ ] Manual test (add detailed scripts or steps below)
- [ ] No need to test or manual test. Explain why:
- [ ] This is a refactor/code format and no logic has been changed.
- [ ] Previous test can cover this change.
- [ ] No code files have been changed.
- [ ] Other reason <!-- Add your reason? -->
- Behavior changed:
- [ ] No.
- [ ] Yes. <!-- Explain the behavior change -->
- Does this need documentation?
- [ ] No.
- [ ] Yes. <!-- Add document PR link here. eg:
https://github.com/apache/doris-website/pull/1214 -->
### Check List (For Reviewer who merge this PR)
- [ ] Confirm the release note
- [ ] Confirm test cases
- [ ] Confirm document
- [ ] Add branch pick label <!-- Add branch pick label that this PR
should merge into -->
---
.../hudi/hudi_mtmv/test_hudi_olap_rewrite_mtmv.out | 16 -
.../hive/test_parquet_join_runtime_filter.groovy | 264 ++++++++--------
.../hudi/test_hudi_olap_rewrite_mtmv.groovy | 352 ++++++++++-----------
3 files changed, 308 insertions(+), 324 deletions(-)
diff --git
a/regression-test/data/external_table_p2/hudi/hudi_mtmv/test_hudi_olap_rewrite_mtmv.out
b/regression-test/data/external_table_p2/hudi/hudi_mtmv/test_hudi_olap_rewrite_mtmv.out
deleted file mode 100644
index 77597631587..00000000000
---
a/regression-test/data/external_table_p2/hudi/hudi_mtmv/test_hudi_olap_rewrite_mtmv.out
+++ /dev/null
@@ -1,16 +0,0 @@
--- This file is automatically generated. You should know what you did if you
want to edit this
--- !refresh_one_partition --
-a 5
-
--- !refresh_one_partition_rewrite --
-a 5
-b 5
-
--- !refresh_auto --
-a 5
-b 5
-
--- !refresh_all_partition_rewrite --
-a 5
-b 5
-
diff --git
a/regression-test/suites/external_table_p0/hive/test_parquet_join_runtime_filter.groovy
b/regression-test/suites/external_table_p0/hive/test_parquet_join_runtime_filter.groovy
index a71d5a1f0fa..12a93429982 100644
---
a/regression-test/suites/external_table_p0/hive/test_parquet_join_runtime_filter.groovy
+++
b/regression-test/suites/external_table_p0/hive/test_parquet_join_runtime_filter.groovy
@@ -15,161 +15,161 @@
// specific language governing permissions and limitations
// under the License.
-import groovy.json.JsonSlurper
-
-suite("test_parquet_join_runtime_filter",
"p0,external,hive,external_docker,external_docker_hive") {
-
- def getProfileList = {
- def dst = 'http://' + context.config.feHttpAddress
- def conn = new URL(dst + "/rest/v1/query_profile").openConnection()
- conn.setRequestMethod("GET")
- def encoding =
Base64.getEncoder().encodeToString((context.config.feHttpUser + ":" +
- (context.config.feHttpPassword == null ? "" :
context.config.feHttpPassword)).getBytes("UTF-8"))
- conn.setRequestProperty("Authorization", "Basic ${encoding}")
- return conn.getInputStream().getText()
- }
-
- def getProfile = { id ->
- def dst = 'http://' + context.config.feHttpAddress
- def conn = new URL(dst +
"/api/profile/text/?query_id=$id").openConnection()
- conn.setRequestMethod("GET")
- def encoding =
Base64.getEncoder().encodeToString((context.config.feHttpUser + ":" +
- (context.config.feHttpPassword == null ? "" :
context.config.feHttpPassword)).getBytes("UTF-8"))
- conn.setRequestProperty("Authorization", "Basic ${encoding}")
- return conn.getInputStream().getText()
- }
-
-
- def extractFilteredGroupsValue = { String profileText ->
- def values = (profileText =~ /FilteredGroups:\s*(\d+)/).collect {
it[1].toLong() }
- return values.sort { a, b -> b <=> a }
- }
-
- def getProfileWithToken = { token ->
- String profileId = ""
- int attempts = 0
- while (attempts < 10 && (profileId == null || profileId == "")) {
- List profileData = new
JsonSlurper().parseText(getProfileList()).data.rows
- for (def profileItem in profileData) {
- if (profileItem["Sql Statement"].toString().contains(token)) {
- profileId = profileItem["Profile ID"].toString()
- break
- }
- }
- if (profileId == null || profileId == "") {
- Thread.sleep(300)
- }
- attempts++
- }
- assertTrue(profileId != null && profileId != "")
- Thread.sleep(800)
- return getProfile(profileId).toString()
- }
- // session vars
- sql "unset variable all;"
- sql "set profile_level=2;"
- sql "set enable_profile=true;"
- sql " set parallel_pipeline_task_num = 1;"
- sql " set file_split_size = 100000;"
-
- String enabled = context.config.otherConfigs.get("enableHiveTest")
- if (!"true".equalsIgnoreCase(enabled)) {
- return;
- }
- for (String hivePrefix : ["hive2"]) {
- String externalEnvIp = context.config.otherConfigs.get("externalEnvIp")
- String hmsPort = context.config.otherConfigs.get(hivePrefix +
"HmsPort")
- String catalog_name = "test_parquet_join_runtime_filter"
-
- sql """drop catalog if exists ${catalog_name};"""
- sql """
- create catalog if not exists ${catalog_name} properties (
- 'type'='hms',
- 'hadoop.username' = 'hadoop',
- 'hive.metastore.uris' = 'thrift://${externalEnvIp}:${hmsPort}'
- );
- """
- logger.info("catalog " + catalog_name + " created")
- sql """switch ${catalog_name};"""
- logger.info("switched to catalog " + catalog_name)
+// import groovy.json.JsonSlurper
+
+// suite("test_parquet_join_runtime_filter",
"p0,external,hive,external_docker,external_docker_hive") {
+
+// def getProfileList = {
+// def dst = 'http://' + context.config.feHttpAddress
+// def conn = new URL(dst + "/rest/v1/query_profile").openConnection()
+// conn.setRequestMethod("GET")
+// def encoding =
Base64.getEncoder().encodeToString((context.config.feHttpUser + ":" +
+// (context.config.feHttpPassword == null ? "" :
context.config.feHttpPassword)).getBytes("UTF-8"))
+// conn.setRequestProperty("Authorization", "Basic ${encoding}")
+// return conn.getInputStream().getText()
+// }
+
+// def getProfile = { id ->
+// def dst = 'http://' + context.config.feHttpAddress
+// def conn = new URL(dst +
"/api/profile/text/?query_id=$id").openConnection()
+// conn.setRequestMethod("GET")
+// def encoding =
Base64.getEncoder().encodeToString((context.config.feHttpUser + ":" +
+// (context.config.feHttpPassword == null ? "" :
context.config.feHttpPassword)).getBytes("UTF-8"))
+// conn.setRequestProperty("Authorization", "Basic ${encoding}")
+// return conn.getInputStream().getText()
+// }
+
+
+// def extractFilteredGroupsValue = { String profileText ->
+// def values = (profileText =~ /FilteredGroups:\s*(\d+)/).collect {
it[1].toLong() }
+// return values.sort { a, b -> b <=> a }
+// }
+
+// def getProfileWithToken = { token ->
+// String profileId = ""
+// int attempts = 0
+// while (attempts < 10 && (profileId == null || profileId == "")) {
+// List profileData = new
JsonSlurper().parseText(getProfileList()).data.rows
+// for (def profileItem in profileData) {
+// if (profileItem["Sql
Statement"].toString().contains(token)) {
+// profileId = profileItem["Profile ID"].toString()
+// break
+// }
+// }
+// if (profileId == null || profileId == "") {
+// Thread.sleep(300)
+// }
+// attempts++
+// }
+// assertTrue(profileId != null && profileId != "")
+// Thread.sleep(800)
+// return getProfile(profileId).toString()
+// }
+// // session vars
+// sql "unset variable all;"
+// sql "set profile_level=2;"
+// sql "set enable_profile=true;"
+// sql " set parallel_pipeline_task_num = 1;"
+// sql " set file_split_size = 100000;"
+
+// String enabled = context.config.otherConfigs.get("enableHiveTest")
+// if (!"true".equalsIgnoreCase(enabled)) {
+// return;
+// }
+// for (String hivePrefix : ["hive2"]) {
+// String externalEnvIp =
context.config.otherConfigs.get("externalEnvIp")
+// String hmsPort = context.config.otherConfigs.get(hivePrefix +
"HmsPort")
+// String catalog_name = "test_parquet_join_runtime_filter"
+
+// sql """drop catalog if exists ${catalog_name};"""
+// sql """
+// create catalog if not exists ${catalog_name} properties (
+// 'type'='hms',
+// 'hadoop.username' = 'hadoop',
+// 'hive.metastore.uris' =
'thrift://${externalEnvIp}:${hmsPort}'
+// );
+// """
+// logger.info("catalog " + catalog_name + " created")
+// sql """switch ${catalog_name};"""
+// logger.info("switched to catalog " + catalog_name)
- sql """ use `default` """
+// sql """ use `default` """
- for (int wait_time : [0, 10, 100]) {
- sql """ set runtime_filter_wait_time_ms = ${wait_time}; """
+// for (int wait_time : [0, 10, 100]) {
+// sql """ set runtime_filter_wait_time_ms = ${wait_time}; """
- def f1 = {
- def t1 = UUID.randomUUID().toString()
- def sql_result = sql """
- select *, "${t1}" from fact_big as a join dim_small as b
on a.k = b.k where b.c1 = 5
- """
- def filter_result =
extractFilteredGroupsValue(getProfileWithToken(t1));
- logger.info("sql_result = ${sql_result}");
- logger.info("filter_result = ${filter_result}");
+// def f1 = {
+// def t1 = UUID.randomUUID().toString()
+// def sql_result = sql """
+// select *, "${t1}" from fact_big as a join dim_small as
b on a.k = b.k where b.c1 = 5
+// """
+// def filter_result =
extractFilteredGroupsValue(getProfileWithToken(t1));
+// logger.info("sql_result = ${sql_result}");
+// logger.info("filter_result = ${filter_result}");
- assertTrue(filter_result.size() == 2)
- assertTrue(filter_result[0] > 40)
- }
+// assertTrue(filter_result.size() == 2)
+// assertTrue(filter_result[0] > 40)
+// }
- def f2 = {
- def t1 = UUID.randomUUID().toString()
- def sql_result = sql """
- select *, "${t1}" from fact_big as a join dim_small as b
on a.k = b.k where b.c1 in (1,2)
- """
- def filter_result =
extractFilteredGroupsValue(getProfileWithToken(t1));
- logger.info("sql_result = ${sql_result}");
- logger.info("filter_result = ${filter_result}");
+// def f2 = {
+// def t1 = UUID.randomUUID().toString()
+// def sql_result = sql """
+// select *, "${t1}" from fact_big as a join dim_small as
b on a.k = b.k where b.c1 in (1,2)
+// """
+// def filter_result =
extractFilteredGroupsValue(getProfileWithToken(t1));
+// logger.info("sql_result = ${sql_result}");
+// logger.info("filter_result = ${filter_result}");
- assertTrue(filter_result.size() == 2)
- assertTrue(filter_result[0] > 30)
- }
+// assertTrue(filter_result.size() == 2)
+// assertTrue(filter_result[0] > 30)
+// }
- def f3 = {
- def t1 = UUID.randomUUID().toString()
- def sql_result = sql """
- select *, "${t1}" from fact_big as a join dim_small as b
on a.k = b.k where b.c1 < 3
- """
- def filter_result =
extractFilteredGroupsValue(getProfileWithToken(t1));
- logger.info("sql_result = ${sql_result}");
- logger.info("filter_result = ${filter_result}");
+// def f3 = {
+// def t1 = UUID.randomUUID().toString()
+// def sql_result = sql """
+// select *, "${t1}" from fact_big as a join dim_small as
b on a.k = b.k where b.c1 < 3
+// """
+// def filter_result =
extractFilteredGroupsValue(getProfileWithToken(t1));
+// logger.info("sql_result = ${sql_result}");
+// logger.info("filter_result = ${filter_result}");
- assertTrue(filter_result.size() == 2)
- assertTrue(filter_result[0] > 30)
- }
+// assertTrue(filter_result.size() == 2)
+// assertTrue(filter_result[0] > 30)
+// }
- def f4 = {
- def t1 = UUID.randomUUID().toString()
- def sql_result = sql """
- select *, "${t1}" from fact_big as a join dim_small as b
on a.k = b.k where b.c2 >= 50
- """
- def filter_result =
extractFilteredGroupsValue(getProfileWithToken(t1));
- logger.info("sql_result = ${sql_result}");
- logger.info("filter_result = ${filter_result}");
+// def f4 = {
+// def t1 = UUID.randomUUID().toString()
+// def sql_result = sql """
+// select *, "${t1}" from fact_big as a join dim_small as
b on a.k = b.k where b.c2 >= 50
+// """
+// def filter_result =
extractFilteredGroupsValue(getProfileWithToken(t1));
+// logger.info("sql_result = ${sql_result}");
+// logger.info("filter_result = ${filter_result}");
- assertTrue(filter_result.size() == 2)
- assertTrue(filter_result[0] > 40)
- }
+// assertTrue(filter_result.size() == 2)
+// assertTrue(filter_result[0] > 40)
+// }
- f1()
- f2()
- f3()
- f4()
- }
+// f1()
+// f2()
+// f3()
+// f4()
+// }
- sql """drop catalog ${catalog_name};"""
- }
+// sql """drop catalog ${catalog_name};"""
+// }
-}
+// }
diff --git
a/regression-test/suites/external_table_p2/hudi/test_hudi_olap_rewrite_mtmv.groovy
b/regression-test/suites/external_table_p2/hudi/test_hudi_olap_rewrite_mtmv.groovy
index c6acaa9c4ab..03465d7cafb 100644
---
a/regression-test/suites/external_table_p2/hudi/test_hudi_olap_rewrite_mtmv.groovy
+++
b/regression-test/suites/external_table_p2/hudi/test_hudi_olap_rewrite_mtmv.groovy
@@ -15,180 +15,180 @@
// specific language governing permissions and limitations
// under the License.
-suite("test_hudi_olap_rewrite_mtmv", "p2,external,hudi") {
- String enabled = context.config.otherConfigs.get("enableHudiTest")
- if (enabled == null || !enabled.equalsIgnoreCase("true")) {
- logger.info("disable hudi test")
- return
- }
- String suiteName = "test_hudi_olap_rewrite_mtmv"
- String catalogName = "${suiteName}_catalog"
- String mvName = "${suiteName}_mv"
- String dbName = context.config.getDbNameByFile(context.file)
- String tableName = "${suiteName}_table"
- sql """drop table if exists ${tableName}"""
- sql """
- CREATE TABLE ${tableName} (
- `user_id` INT,
- `num` INT
- ) ENGINE=OLAP
- DUPLICATE KEY(`user_id`)
- DISTRIBUTED BY HASH(`user_id`) BUCKETS 2
- PROPERTIES ('replication_num' = '1') ;
- """
- sql """
- insert into ${tableName} values(1,2);
- """
-
- sql """analyze table internal.`${dbName}`. ${tableName} with sync"""
- sql """alter table internal.`${dbName}`. ${tableName} modify column
user_id set stats ('row_count'='1');"""
-
- String externalEnvIp = context.config.otherConfigs.get("externalEnvIp")
- String hudiHmsPort = context.config.otherConfigs.get("hudiHmsPort")
- String hudiMinioPort = context.config.otherConfigs.get("hudiMinioPort")
- String hudiMinioAccessKey =
context.config.otherConfigs.get("hudiMinioAccessKey")
- String hudiMinioSecretKey =
context.config.otherConfigs.get("hudiMinioSecretKey")
-
- sql """set materialized_view_rewrite_enable_contain_external_table=true;"""
- String mvSql = "SELECT par, count(*) FROM
${catalogName}.`hudi_mtmv_regression_test`.hudi_table_1 a left join
${tableName} b on a.id=b.user_id group by par;";
-
- sql """drop catalog if exists ${catalogName}"""
- sql """
- create catalog if not exists ${catalogName} properties (
- 'type'='hms',
- 'hive.metastore.uris' = 'thrift://${externalEnvIp}:${hudiHmsPort}',
- 's3.endpoint' = 'http://${externalEnvIp}:${hudiMinioPort}',
- 's3.access_key' = '${hudiMinioAccessKey}',
- 's3.secret_key' = '${hudiMinioSecretKey}',
- 's3.region' = 'us-east-1',
- 'use_path_style' = 'true'
- );
- """
-
- sql """analyze table
${catalogName}.`hudi_mtmv_regression_test`.hudi_table_1 with sync"""
- sql """alter table ${catalogName}.`hudi_mtmv_regression_test`.hudi_table_1
modify column par set stats ('row_count'='10');"""
- sql """
-alter table ${catalogName}.hudi_mtmv_regression_test.hudi_table_1
-modify column age set stats (
- "ndv"="10",
- "num_nulls"="0",
- "min_value"="1",
- "max_value"="10",
- "row_count"="10"
-);
-"""
-
- sql """
-alter table ${catalogName}.hudi_mtmv_regression_test.hudi_table_1
-modify column _hoodie_record_key set stats (
- "ndv"="10",
- "num_nulls"="0",
- "min_value"="20250121171615893_0_0",
- "max_value"="20250121171615893_7_1",
- "row_count"="10"
-);
-"""
-
- sql """
-alter table ${catalogName}.hudi_mtmv_regression_test.hudi_table_1
-modify column id set stats (
- "ndv"="10",
- "num_nulls"="0",
- "min_value"="1",
- "max_value"="10",
- "row_count"="10"
-);
-"""
-
- sql """
-alter table ${catalogName}.hudi_mtmv_regression_test.hudi_table_1
-modify column _hoodie_file_name set stats (
- "ndv"="2",
- "num_nulls"="0",
-
"min_value"="58eabd3f-1996-4cb6-83e4-56fd11cb4e7d-0_0-30-108_20250121171615893.parquet",
-
"max_value"="7f98e9ac-bd11-48fd-ac80-9ca6dc1ddb34-0_1-30-109_20250121171615893.parquet",
- "row_count"="10"
-);
-"""
-
- sql """
-alter table ${catalogName}.hudi_mtmv_regression_test.hudi_table_1
-modify column _hoodie_partition_path set stats (
- "ndv"="2",
- "num_nulls"="0",
- "min_value"="par=a",
- "max_value"="par=b",
- "row_count"="10"
-);
-"""
-
- sql """
-alter table ${catalogName}.hudi_mtmv_regression_test.hudi_table_1
-modify column _hoodie_commit_seqno set stats (
- "ndv"="10",
- "num_nulls"="0",
- "min_value"="20250121171615893_0_0",
- "max_value"="20250121171615893_1_4",
- "row_count"="10"
-);
-"""
-
- sql """
-alter table ${catalogName}.hudi_mtmv_regression_test.hudi_table_1
-modify column _hoodie_commit_time set stats (
- "ndv"="1",
- "num_nulls"="0",
- "min_value"="20250121171615893",
- "max_value"="20250121171615893",
- "row_count"="10"
-);
-"""
-
- sql """drop materialized view if exists ${mvName};"""
-
- sql """
- CREATE MATERIALIZED VIEW ${mvName}
- BUILD DEFERRED REFRESH AUTO ON MANUAL
- partition by(`par`)
- DISTRIBUTED BY RANDOM BUCKETS 2
- PROPERTIES ('replication_num' = '1')
- AS
- ${mvSql}
- """
- def showPartitionsResult = sql """show partitions from ${mvName}"""
- logger.info("showPartitionsResult: " + showPartitionsResult.toString())
- assertTrue(showPartitionsResult.toString().contains("p_a"))
- assertTrue(showPartitionsResult.toString().contains("p_b"))
-
- // refresh one partitions
- sql """
- REFRESH MATERIALIZED VIEW ${mvName} partitions(p_a);
- """
- waitingMTMVTaskFinishedByMvName(mvName)
- order_qt_refresh_one_partition "SELECT id, age, par, user_id, num FROM
${mvName} "
-
- order_qt_refresh_one_partition_rewrite "${mvSql}"
-
- mv_rewrite_success("${mvSql}", "${mvName}")
-
- // select p_b should not rewrite
- mv_not_part_in("SELECT par, count(*) FROM
${catalogName}.`hudi_mtmv_regression_test`.hudi_table_1 a left join
${tableName} b on a.id=b.user_id where a.par='b' group by par;", "${mvName}")
-
- //refresh auto
- sql """
- REFRESH MATERIALIZED VIEW ${mvName} auto
- """
- waitingMTMVTaskFinishedByMvName(mvName)
- order_qt_refresh_auto "SELECT id, age, par, user_id, num FROM ${mvName} "
-
- def explainAllPartition = sql """ explain ${mvSql}; """
- logger.info("explainAllPartition: " + explainAllPartition.toString())
- assertTrue(explainAllPartition.toString().contains("VOlapScanNode"))
- order_qt_refresh_all_partition_rewrite "${mvSql}"
-
- mv_rewrite_success("${mvSql}", "${mvName}")
-
- sql """drop materialized view if exists ${mvName};"""
- sql """drop catalog if exists ${catalogName}"""
-}
+// suite("test_hudi_olap_rewrite_mtmv", "p2,external,hudi") {
+// String enabled = context.config.otherConfigs.get("enableHudiTest")
+// if (enabled == null || !enabled.equalsIgnoreCase("true")) {
+// logger.info("disable hudi test")
+// return
+// }
+// String suiteName = "test_hudi_olap_rewrite_mtmv"
+// String catalogName = "${suiteName}_catalog"
+// String mvName = "${suiteName}_mv"
+// String dbName = context.config.getDbNameByFile(context.file)
+// String tableName = "${suiteName}_table"
+// sql """drop table if exists ${tableName}"""
+// sql """
+// CREATE TABLE ${tableName} (
+// `user_id` INT,
+// `num` INT
+// ) ENGINE=OLAP
+// DUPLICATE KEY(`user_id`)
+// DISTRIBUTED BY HASH(`user_id`) BUCKETS 2
+// PROPERTIES ('replication_num' = '1') ;
+// """
+// sql """
+// insert into ${tableName} values(1,2);
+// """
+
+// sql """analyze table internal.`${dbName}`. ${tableName} with sync"""
+// sql """alter table internal.`${dbName}`. ${tableName} modify column
user_id set stats ('row_count'='1');"""
+
+// String externalEnvIp = context.config.otherConfigs.get("externalEnvIp")
+// String hudiHmsPort = context.config.otherConfigs.get("hudiHmsPort")
+// String hudiMinioPort = context.config.otherConfigs.get("hudiMinioPort")
+// String hudiMinioAccessKey =
context.config.otherConfigs.get("hudiMinioAccessKey")
+// String hudiMinioSecretKey =
context.config.otherConfigs.get("hudiMinioSecretKey")
+
+// sql """set
materialized_view_rewrite_enable_contain_external_table=true;"""
+// String mvSql = "SELECT par, count(*) FROM
${catalogName}.`hudi_mtmv_regression_test`.hudi_table_1 a left join
${tableName} b on a.id=b.user_id group by par;";
+
+// sql """drop catalog if exists ${catalogName}"""
+// sql """
+// create catalog if not exists ${catalogName} properties (
+// 'type'='hms',
+// 'hive.metastore.uris' =
'thrift://${externalEnvIp}:${hudiHmsPort}',
+// 's3.endpoint' = 'http://${externalEnvIp}:${hudiMinioPort}',
+// 's3.access_key' = '${hudiMinioAccessKey}',
+// 's3.secret_key' = '${hudiMinioSecretKey}',
+// 's3.region' = 'us-east-1',
+// 'use_path_style' = 'true'
+// );
+// """
+
+// sql """analyze table
${catalogName}.`hudi_mtmv_regression_test`.hudi_table_1 with sync"""
+// sql """alter table
${catalogName}.`hudi_mtmv_regression_test`.hudi_table_1 modify column par set
stats ('row_count'='10');"""
+// sql """
+// alter table ${catalogName}.hudi_mtmv_regression_test.hudi_table_1
+// modify column age set stats (
+// "ndv"="10",
+// "num_nulls"="0",
+// "min_value"="1",
+// "max_value"="10",
+// "row_count"="10"
+// );
+// """
+
+// sql """
+// alter table ${catalogName}.hudi_mtmv_regression_test.hudi_table_1
+// modify column _hoodie_record_key set stats (
+// "ndv"="10",
+// "num_nulls"="0",
+// "min_value"="20250121171615893_0_0",
+// "max_value"="20250121171615893_7_1",
+// "row_count"="10"
+// );
+// """
+
+// sql """
+// alter table ${catalogName}.hudi_mtmv_regression_test.hudi_table_1
+// modify column id set stats (
+// "ndv"="10",
+// "num_nulls"="0",
+// "min_value"="1",
+// "max_value"="10",
+// "row_count"="10"
+// );
+// """
+
+// sql """
+// alter table ${catalogName}.hudi_mtmv_regression_test.hudi_table_1
+// modify column _hoodie_file_name set stats (
+// "ndv"="2",
+// "num_nulls"="0",
+//
"min_value"="58eabd3f-1996-4cb6-83e4-56fd11cb4e7d-0_0-30-108_20250121171615893.parquet",
+//
"max_value"="7f98e9ac-bd11-48fd-ac80-9ca6dc1ddb34-0_1-30-109_20250121171615893.parquet",
+// "row_count"="10"
+// );
+// """
+
+// sql """
+// alter table ${catalogName}.hudi_mtmv_regression_test.hudi_table_1
+// modify column _hoodie_partition_path set stats (
+// "ndv"="2",
+// "num_nulls"="0",
+// "min_value"="par=a",
+// "max_value"="par=b",
+// "row_count"="10"
+// );
+// """
+
+// sql """
+// alter table ${catalogName}.hudi_mtmv_regression_test.hudi_table_1
+// modify column _hoodie_commit_seqno set stats (
+// "ndv"="10",
+// "num_nulls"="0",
+// "min_value"="20250121171615893_0_0",
+// "max_value"="20250121171615893_1_4",
+// "row_count"="10"
+// );
+// """
+
+// sql """
+// alter table ${catalogName}.hudi_mtmv_regression_test.hudi_table_1
+// modify column _hoodie_commit_time set stats (
+// "ndv"="1",
+// "num_nulls"="0",
+// "min_value"="20250121171615893",
+// "max_value"="20250121171615893",
+// "row_count"="10"
+// );
+// """
+
+// sql """drop materialized view if exists ${mvName};"""
+
+// sql """
+// CREATE MATERIALIZED VIEW ${mvName}
+// BUILD DEFERRED REFRESH AUTO ON MANUAL
+// partition by(`par`)
+// DISTRIBUTED BY RANDOM BUCKETS 2
+// PROPERTIES ('replication_num' = '1')
+// AS
+// ${mvSql}
+// """
+// def showPartitionsResult = sql """show partitions from ${mvName}"""
+// logger.info("showPartitionsResult: " + showPartitionsResult.toString())
+// assertTrue(showPartitionsResult.toString().contains("p_a"))
+// assertTrue(showPartitionsResult.toString().contains("p_b"))
+
+// // refresh one partitions
+// sql """
+// REFRESH MATERIALIZED VIEW ${mvName} partitions(p_a);
+// """
+// waitingMTMVTaskFinishedByMvName(mvName)
+// order_qt_refresh_one_partition "SELECT id, age, par, user_id, num FROM
${mvName} "
+
+// order_qt_refresh_one_partition_rewrite "${mvSql}"
+
+// mv_rewrite_success("${mvSql}", "${mvName}")
+
+// // select p_b should not rewrite
+// mv_not_part_in("SELECT par, count(*) FROM
${catalogName}.`hudi_mtmv_regression_test`.hudi_table_1 a left join
${tableName} b on a.id=b.user_id where a.par='b' group by par;", "${mvName}")
+
+// //refresh auto
+// sql """
+// REFRESH MATERIALIZED VIEW ${mvName} auto
+// """
+// waitingMTMVTaskFinishedByMvName(mvName)
+// order_qt_refresh_auto "SELECT id, age, par, user_id, num FROM ${mvName}
"
+
+// def explainAllPartition = sql """ explain ${mvSql}; """
+// logger.info("explainAllPartition: " + explainAllPartition.toString())
+// assertTrue(explainAllPartition.toString().contains("VOlapScanNode"))
+// order_qt_refresh_all_partition_rewrite "${mvSql}"
+
+// mv_rewrite_success("${mvSql}", "${mvName}")
+
+// sql """drop materialized view if exists ${mvName};"""
+// sql """drop catalog if exists ${catalogName}"""
+// }
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]