Copilot commented on code in PR #62363:
URL: https://github.com/apache/doris/pull/62363#discussion_r3064319533
##########
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 = {
Review Comment:
This file’s `suite(...)` is fully commented out, so the runtime filter
regression checks are no longer executed at all. If this is meant to be
temporarily disabled due to flakiness/environment constraints, it should be
gated via config/tags or skipped with an explicit reason (or removed), rather
than commenting out the whole suite and silently reducing regression coverage.
##########
fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/insert/InsertIntoTableCommand.java:
##########
@@ -308,6 +308,8 @@ public AbstractInsertExecutor initPlan(ConnectContext ctx,
StmtExecutor stmtExec
buildResult.planner.getFragments().get(0),
buildResult.dataSink,
buildResult.physicalSink
);
+ } else if (insertExecutor.shouldExecuteEmptyInsert()) {
+ insertExecutor.beginTransaction();
}
Review Comment:
PR title/description indicate this is a test-only fix, but this change set
also modifies production behavior (e.g. insert execution flow for empty inserts
/ Iceberg static partition overwrite). Please update the PR description (and
checklist) to reflect the user-visible/behavioral change and any required
validation, or split the functional change into a separate PR if this is
intended to be test-only.
##########
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
Review Comment:
This file now has the entire `suite(...) { ... }` block commented out, which
means the test no longer runs under any configuration (even when
`enableHudiTest=true`). If the intent is to disable this test on branch 4.1,
prefer removing the file (and any related `.out` data) or adding an explicit
skip/early-return with a clear reason, rather than leaving a large
commented-out suite that silently drops coverage.
##########
fe/fe-core/src/test/java/org/apache/doris/datasource/iceberg/IcebergTransactionTest.java:
##########
@@ -135,10 +136,14 @@ private void createTable() {
}
private List<String> createPartitionValues() {
+ return
createPartitionValues(Instant.parse("2024-12-11T12:34:56.123456Z"),
+ "2024-12-11", "2024-12-11", 1);
+ }
- Instant instant = Instant.parse("2024-12-11T12:34:56.123456Z");
+ private List<String> createPartitionValues(Instant instant, String str1,
String str2, Integer int1) {
long ts = DateTimeUtil.microsFromInstant(instant);
int dt = DateTimeUtil.daysFromInstant(instant);
+ String dateString = numToDay(dt);
Review Comment:
With the new `createPartitionValues(Instant, ...)` overload supporting
different `instant` values, the partition list should derive all time-based
partition strings from that `instant`. Currently the ts3 day partition value is
still hard-coded ("2024-12-11"), which makes the generated partition values
inconsistent for callers like the new 2024-12-12 test case. Please compute the
ts3 (day) value from `instant` as well (similar to `dateString`).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]