This is an automated email from the ASF dual-hosted git repository.
dataroaring pushed a commit to branch branch-3.0
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-3.0 by this push:
new 4595c4fdf8a branch-3.0: [fix](test) fix some regression test cases
(#53588) (#53589)
4595c4fdf8a is described below
commit 4595c4fdf8a928e69649295fdbfa20598be94b05
Author: Mingyu Chen (Rayner) <[email protected]>
AuthorDate: Sun Jul 20 06:52:57 2025 -0700
branch-3.0: [fix](test) fix some regression test cases (#53588) (#53589)
bp #53588
And fix some test cases in branch-3.0
---
.../datasource/iceberg/IcebergTransaction.java | 11 ++++--
.../hive/test_information_schema_external.out | Bin 16851 -> 17057 bytes
.../hive/test_information_schema_external.groovy | 37 ++++++++-------------
.../iceberg/test_s3tables_write_insert.groovy | 17 ----------
4 files changed, 21 insertions(+), 44 deletions(-)
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/datasource/iceberg/IcebergTransaction.java
b/fe/fe-core/src/main/java/org/apache/doris/datasource/iceberg/IcebergTransaction.java
index c7d7212335a..f691f14ebb6 100644
---
a/fe/fe-core/src/main/java/org/apache/doris/datasource/iceberg/IcebergTransaction.java
+++
b/fe/fe-core/src/main/java/org/apache/doris/datasource/iceberg/IcebergTransaction.java
@@ -84,7 +84,6 @@ public class IcebergTransaction implements Transaction {
} catch (Exception e) {
throw new UserException("Failed to begin insert for iceberg table
" + tableInfo, e);
}
-
}
public void finishInsert(SimpleTableInfo tableInfo,
Optional<InsertCommandContext> insertCtx) {
@@ -133,8 +132,14 @@ public class IcebergTransaction implements Transaction {
@Override
public void commit() throws UserException {
- // commit the iceberg transaction
- transaction.commitTransaction();
+ try {
+ // commit the iceberg transaction
+ ops.getPreExecutionAuthenticator().execute(() -> {
+ transaction.commitTransaction();
+ });
+ } catch (Exception e) {
+ throw new UserException("Failed to commit iceberg transaction for
table " + tableInfo, e);
+ }
}
@Override
diff --git
a/regression-test/data/external_table_p0/hive/test_information_schema_external.out
b/regression-test/data/external_table_p0/hive/test_information_schema_external.out
index 199b9e0b123..6142e37c2b8 100644
Binary files
a/regression-test/data/external_table_p0/hive/test_information_schema_external.out
and
b/regression-test/data/external_table_p0/hive/test_information_schema_external.out
differ
diff --git
a/regression-test/suites/external_table_p0/hive/test_information_schema_external.groovy
b/regression-test/suites/external_table_p0/hive/test_information_schema_external.groovy
index 71cd62f8d6e..04b155826b6 100644
---
a/regression-test/suites/external_table_p0/hive/test_information_schema_external.groovy
+++
b/regression-test/suites/external_table_p0/hive/test_information_schema_external.groovy
@@ -37,14 +37,17 @@ suite("test_information_schema_external",
"p0,external,hive,external_docker,exte
);"""
def db_name = "info_schema_ext_db"
+ sql """drop database if exists ${db_name} force"""
+ sql """drop database if exists ${db_name}_1 force"""
+ sql """drop database if exists ${db_name}_2 force"""
//schemata
order_qt_schemata_1 """
select * from ${catalog_name}.information_schema.schemata
where CATALOG_NAME = "${catalog_name}" and SCHEMA_NAME =
"default";
"""
- sql """ create database if not exists ${db_name}_1; """
- sql """ create database if not exists ${db_name}_2; """
+ sql """ create database ${db_name}_1; """
+ sql """ create database ${db_name}_2; """
order_qt_schemata_2 """
select * from internal.information_schema.schemata
where CATALOG_NAME = "internal" and SCHEMA_NAME =
"${db_name}_1";
@@ -53,7 +56,7 @@ suite("test_information_schema_external",
"p0,external,hive,external_docker,exte
select * from internal.information_schema.schemata
where CATALOG_NAME = "internal" and SCHEMA_NAME =
"${db_name}_2";
"""
- sql """ drop database if exists ${db_name}_1 """
+ sql """ drop database ${db_name}_1 """
order_qt_schemata_4 """
select * from internal.information_schema.schemata
where CATALOG_NAME = "internal" and SCHEMA_NAME =
"${db_name}_1";
@@ -62,7 +65,7 @@ suite("test_information_schema_external",
"p0,external,hive,external_docker,exte
select * from internal.information_schema.schemata
where CATALOG_NAME = "internal" and SCHEMA_NAME =
"${db_name}_2";
"""
- sql """ drop database if exists ${db_name}_2 """
+ sql """ drop database ${db_name}_2 """
order_qt_schemata_6 """
select * from internal.information_schema.schemata
where CATALOG_NAME = "internal" and SCHEMA_NAME =
"${db_name}_1";
@@ -80,12 +83,8 @@ suite("test_information_schema_external",
"p0,external,hive,external_docker,exte
where CATALOG_NAME = "internal" and SCHEMA_NAME =
"infomation_schema_ext";
"""
- sql """ drop database if exists ${db_name}_1 """
- sql """ drop database if exists ${db_name}_2 """
-
//columns
- sql """ create database if not exists ${db_name}; """
- sql """ drop table if exists ${db_name}.abcd """
+ sql """ create database ${db_name}; """
sql """
CREATE TABLE ${db_name}.abcd (
`id` int(11) not null ,
@@ -99,7 +98,6 @@ suite("test_information_schema_external",
"p0,external,hive,external_docker,exte
select * from internal.information_schema.columns
where TABLE_CATALOG = "internal" and TABLE_SCHEMA =
"${db_name}";
"""
- sql """ drop table if exists ${db_name} """
order_qt_columns_2 """
select * from internal.information_schema.columns
where TABLE_CATALOG = "internal" and TABLE_SCHEMA =
"${db_name}";
@@ -124,8 +122,8 @@ suite("test_information_schema_external",
"p0,external,hive,external_docker,exte
select * from ${catalog_name}.information_schema.columns
where TABLE_CATALOG = "${catalog_name}" and TABLE_SCHEMA
= "tpch1_parquet" and TABLE_NAME = "partsupp";
"""
- sql """ drop table if exists ${db_name}.abcd """
- sql """ drop database if exists ${db_name}; """
+ sql """ drop table ${db_name}.abcd """
+ sql """ drop database ${db_name}; """
//metadata_name_ids
order_qt_ids_1 """
@@ -192,10 +190,9 @@ suite("test_information_schema_external",
"p0,external,hive,external_docker,exte
"""
//views
- sql """ create database if not exists ${db_name}; """
- sql """ drop table if exists ${db_name}.ab """
+ sql """ create database ${db_name}; """
sql """
- CREATE TABLE ${db_name}.ab (
+ CREATE TABLE ${db_name}.ab (
`id` int(11) not null ,
`name` string
)
@@ -203,9 +200,8 @@ suite("test_information_schema_external",
"p0,external,hive,external_docker,exte
DISTRIBUTED BY HASH(`id`) BUCKETS 1
PROPERTIES("replication_num" = "1");
"""
- sql """ drop VIEW IF EXISTS ${db_name}.test_view """
sql """
- CREATE VIEW IF NOT EXISTS ${db_name}.test_view (a)
+ CREATE VIEW ${db_name}.test_view (a)
AS
SELECT id as a FROM ${db_name}.ab
"""
@@ -218,13 +214,6 @@ suite("test_information_schema_external",
"p0,external,hive,external_docker,exte
select * from internal.information_schema.views
where TABLE_SCHEMA = "${db_name}" and TABLE_NAME =
"test_view";
"""
- sql """ drop VIEW IF EXISTS ${db_name}.test_view """
- sql """ drop table if exists ${db_name}.ab """
- sql """ drop database if exists ${db_name}; """
-
-
-
- sql """drop catalog if exists ${catalog_name}"""
} finally {
}
}
diff --git
a/regression-test/suites/external_table_p2/iceberg/test_s3tables_write_insert.groovy
b/regression-test/suites/external_table_p2/iceberg/test_s3tables_write_insert.groovy
index 670b3e11206..05c7eaeed47 100644
---
a/regression-test/suites/external_table_p2/iceberg/test_s3tables_write_insert.groovy
+++
b/regression-test/suites/external_table_p2/iceberg/test_s3tables_write_insert.groovy
@@ -617,23 +617,6 @@ suite("test_s3tables_write_insert",
"p2,external,iceberg,external_remote,externa
order_qt_q03 """ select * from ${all_types_partition_table};
"""
- // just test
- sql """
- SELECT
- CASE
- WHEN file_size_in_bytes BETWEEN 0 AND 8 * 1024 * 1024 THEN
'0-8M'
- WHEN file_size_in_bytes BETWEEN 8 * 1024 * 1024 + 1 AND 32 *
1024 * 1024 THEN '8-32M'
- WHEN file_size_in_bytes BETWEEN 2 * 1024 * 1024 + 1 AND 128 *
1024 * 1024 THEN '32-128M'
- WHEN file_size_in_bytes BETWEEN 128 * 1024 * 1024 + 1 AND 512
* 1024 * 1024 THEN '128-512M'
- WHEN file_size_in_bytes > 512 * 1024 * 1024 THEN '> 512M'
- ELSE 'Unknown'
- END AS SizeRange,
- COUNT(*) AS FileNum
- FROM ${all_types_partition_table}\$data_files
- GROUP BY
- SizeRange;
- """
-
sql """ DROP TABLE ${all_types_partition_table}; """
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]