This is an automated email from the ASF dual-hosted git repository.
yuqi4733 pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/gravitino.git
The following commit(s) were added to refs/heads/main by this push:
new 398701413 [#4779] Improvement(trino-connector): Add the testset for
the Iceberg catalog with jdbc backend (#4780)
398701413 is described below
commit 3987014132182b88dcbc6c8e5514e7e268526880
Author: Yuhui <[email protected]>
AuthorDate: Mon Sep 9 17:21:12 2024 +0800
[#4779] Improvement(trino-connector): Add the testset for the Iceberg
catalog with jdbc backend (#4780)
### What changes were proposed in this pull request?
Add the testset for the Iceberg catalog with jdbc backend, it reuse the
Hive metastore backend testset
### Why are the changes needed?
Fix: #4779
### Does this PR introduce _any_ user-facing change?
NO
### How was this patch tested?
New It
---
.../docker-script/init/trino/init.sh | 4 ++-
.../integration/test/TrinoQueryTestTool.java | 11 +++++-
.../lakehouse-iceberg/00000_create_table.sql | 42 +++++++++++-----------
.../lakehouse-iceberg/00000_create_table.txt | 24 ++++++-------
.../lakehouse-iceberg/00001_select_table.sql | 24 ++++++-------
.../lakehouse-iceberg/00002_alter_table.sql | 40 ++++++++++-----------
.../lakehouse-iceberg/00002_alter_table.txt | 24 ++++++-------
.../testsets/lakehouse-iceberg/00006_datatype.sql | 6 ++--
.../testsets/lakehouse-iceberg/00006_datatype.txt | 8 ++---
.../testsets/lakehouse-iceberg/00007_varchar.sql | 10 +++---
.../testsets/lakehouse-iceberg/00007_varchar.txt | 4 +--
.../catalog_iceberg_mysql_cleanup.sql | 1 +
.../catalog_iceberg_mysql_prepare.sql | 17 +++++++++
.../lakehouse-iceberg/catalog_iceberg_prepare.sql | 8 ++++-
14 files changed, 129 insertions(+), 94 deletions(-)
diff --git a/integration-test-common/docker-script/init/trino/init.sh
b/integration-test-common/docker-script/init/trino/init.sh
index b997090ef..006a35f0e 100644
--- a/integration-test-common/docker-script/init/trino/init.sh
+++ b/integration-test-common/docker-script/init/trino/init.sh
@@ -27,7 +27,9 @@ cp "$trino_conf_dir/config/jvm.config" /etc/trino/jvm.config
cp "$trino_conf_dir/config/log4j2.properties" /etc/trino/log4j2.properties
cp "$trino_conf_dir/config/catalog/gravitino.properties"
/etc/trino/catalog/gravitino.properties
-#
+# Copy the MYSQL driver to iceberg connector
+cp /usr/lib/trino/plugin/mysql/mysql-connector-j-8.2.0.jar
/usr/lib/trino/plugin/iceberg/
+
# Update `gravitino.uri = http://GRAVITINO_HOST_IP:GRAVITINO_HOST_PORT` in the
`conf/catalog/gravitino.properties`
sed -i
"s/GRAVITINO_HOST_IP:GRAVITINO_HOST_PORT/${GRAVITINO_HOST_IP}:${GRAVITINO_HOST_PORT}/g"
/etc/trino/catalog/gravitino.properties
# Update `gravitino.metalake = GRAVITINO_METALAKE_NAME` in the
`conf/catalog/gravitino.properties`
diff --git
a/trino-connector/integration-test/src/test/java/org/apache/gravitino/trino/connector/integration/test/TrinoQueryTestTool.java
b/trino-connector/integration-test/src/test/java/org/apache/gravitino/trino/connector/integration/test/TrinoQueryTestTool.java
index af282addd..676bcb628 100644
---
a/trino-connector/integration-test/src/test/java/org/apache/gravitino/trino/connector/integration/test/TrinoQueryTestTool.java
+++
b/trino-connector/integration-test/src/test/java/org/apache/gravitino/trino/connector/integration/test/TrinoQueryTestTool.java
@@ -136,7 +136,16 @@ public class TrinoQueryTestTool {
TrinoQueryIT.ciTestsets.clear();
String testHost = commandLine.getOptionValue("test_host");
- TrinoQueryIT.testHost = Strings.isBlank(testHost) ?
TrinoQueryIT.testHost : testHost;
+ if (Strings.isNotEmpty(testHost)) {
+ TrinoQueryIT.testHost = testHost;
+ TrinoQueryIT.gravitinoUri = String.format("http://%s:8090", testHost);
+ TrinoQueryIT.trinoUri = String.format("http://%s:8080", testHost);
+ TrinoQueryIT.hiveMetastoreUri = String.format("thrift://%s:9083",
testHost);
+ TrinoQueryIT.hdfsUri = String.format("hdfs://%s:9000", testHost);
+ TrinoQueryIT.mysqlUri = String.format("jdbc:mysql://%s", testHost);
+ TrinoQueryIT.postgresqlUri = String.format("jdbc:postgresql://%s",
testHost);
+ }
+
String gravitinoUri = commandLine.getOptionValue("gravitino_uri");
TrinoQueryIT.gravitinoUri =
Strings.isBlank(gravitinoUri) ? TrinoQueryIT.gravitinoUri :
gravitinoUri;
diff --git
a/trino-connector/integration-test/src/test/resources/trino-ci-testset/testsets/lakehouse-iceberg/00000_create_table.sql
b/trino-connector/integration-test/src/test/resources/trino-ci-testset/testsets/lakehouse-iceberg/00000_create_table.sql
index a2936fb13..dc545884b 100644
---
a/trino-connector/integration-test/src/test/resources/trino-ci-testset/testsets/lakehouse-iceberg/00000_create_table.sql
+++
b/trino-connector/integration-test/src/test/resources/trino-ci-testset/testsets/lakehouse-iceberg/00000_create_table.sql
@@ -1,13 +1,13 @@
-CREATE SCHEMA gt_iceberg.gt_db2;
+CREATE SCHEMA gt_db2;
-CREATE TABLE gt_iceberg.gt_db2.tb01(
+CREATE TABLE gt_db2.tb01(
name varchar,
salary int
);
-show create table gt_iceberg.gt_db2.tb01;
+show create table gt_db2.tb01;
-CREATE TABLE gt_iceberg.gt_db2.tb02 (
+CREATE TABLE gt_db2.tb02 (
name varchar,
salary int
) with (
@@ -15,9 +15,9 @@ CREATE TABLE gt_iceberg.gt_db2.tb02 (
sorted_by = ARRAY['salary']
);
-show create table gt_iceberg.gt_db2.tb02;
+show create table gt_db2.tb02;
-CREATE TABLE gt_iceberg.gt_db2.tb03 (
+CREATE TABLE gt_db2.tb03 (
name varchar,
salary int
) with (
@@ -25,7 +25,7 @@ CREATE TABLE gt_iceberg.gt_db2.tb03 (
sorted_by = ARRAY['salary_wrong_name']
);
-CREATE TABLE gt_iceberg.gt_db2.tb03 (
+CREATE TABLE gt_db2.tb03 (
name varchar,
salary int
) with (
@@ -33,46 +33,46 @@ CREATE TABLE gt_iceberg.gt_db2.tb03 (
sorted_by = ARRAY['name']
);
-show create table gt_iceberg.gt_db2.tb03;
+show create table gt_db2.tb03;
-CREATE TABLE gt_iceberg.gt_db2.tb04 (
+CREATE TABLE gt_db2.tb04 (
name varchar,
salary int
) with (
sorted_by = ARRAY['name']
);
-show create table gt_iceberg.gt_db2.tb04;
+show create table gt_db2.tb04;
-CREATE TABLE gt_iceberg.gt_db2.tb05 (
+CREATE TABLE gt_db2.tb05 (
name varchar,
salary int
) with (
partitioning = ARRAY['name']
);
-show create table gt_iceberg.gt_db2.tb05;
+show create table gt_db2.tb05;
-CREATE TABLE gt_iceberg.gt_db2.tb06 (
+CREATE TABLE gt_db2.tb06 (
name varchar,
salary int
) with (
location =
'${hdfs_uri}/user/iceberg/warehouse/TrinoQueryIT/gt_iceberg/gt_db2/tb06'
);
-show create table gt_iceberg.gt_db2.tb06;
+show create table gt_db2.tb06;
-drop table gt_iceberg.gt_db2.tb01;
+drop table gt_db2.tb01;
-drop table gt_iceberg.gt_db2.tb02;
+drop table gt_db2.tb02;
-drop table gt_iceberg.gt_db2.tb03;
+drop table gt_db2.tb03;
-drop table gt_iceberg.gt_db2.tb04;
+drop table gt_db2.tb04;
-drop table gt_iceberg.gt_db2.tb05;
+drop table gt_db2.tb05;
-drop table gt_iceberg.gt_db2.tb06;
+drop table gt_db2.tb06;
-drop schema gt_iceberg.gt_db2;
\ No newline at end of file
+drop schema gt_db2;
\ No newline at end of file
diff --git
a/trino-connector/integration-test/src/test/resources/trino-ci-testset/testsets/lakehouse-iceberg/00000_create_table.txt
b/trino-connector/integration-test/src/test/resources/trino-ci-testset/testsets/lakehouse-iceberg/00000_create_table.txt
index d7cbbec0b..2cea55a45 100644
---
a/trino-connector/integration-test/src/test/resources/trino-ci-testset/testsets/lakehouse-iceberg/00000_create_table.txt
+++
b/trino-connector/integration-test/src/test/resources/trino-ci-testset/testsets/lakehouse-iceberg/00000_create_table.txt
@@ -2,24 +2,24 @@ CREATE SCHEMA
CREATE TABLE
-"CREATE TABLE gt_iceberg.gt_db2.tb01 (
+"CREATE TABLE %.gt_db2.tb01 (
name varchar,
salary integer
)
COMMENT ''
WITH (
- location = 'hdfs://%/user/iceberg/warehouse/TrinoQueryIT/gt_db2.db/tb01'
+ location = 'hdfs://%/user/iceberg/warehouse/TrinoQueryIT/gt_db2%/tb01'
)"
CREATE TABLE
-"CREATE TABLE gt_iceberg.gt_db2.tb02 (
+"CREATE TABLE %.gt_db2.tb02 (
name varchar,
salary integer
)
COMMENT ''
WITH (
- location = 'hdfs://%/user/iceberg/warehouse/TrinoQueryIT/gt_db2.db/tb02',
+ location = 'hdfs://%/user/iceberg/warehouse/TrinoQueryIT/gt_db2%/tb02',
partitioning = ARRAY['name'],
sorted_by = ARRAY['salary']
)"
@@ -28,50 +28,50 @@ WITH (
CREATE TABLE
-"CREATE TABLE gt_iceberg.gt_db2.tb03 (
+"CREATE TABLE %.gt_db2.tb03 (
name varchar,
salary integer
)
COMMENT ''
WITH (
- location = 'hdfs://%/user/iceberg/warehouse/TrinoQueryIT/gt_db2.db/tb03',
+ location = 'hdfs://%/user/iceberg/warehouse/TrinoQueryIT/gt_db2%/tb03',
partitioning = ARRAY['name'],
sorted_by = ARRAY['name']
)"
CREATE TABLE
-"CREATE TABLE gt_iceberg.gt_db2.tb04 (
+"CREATE TABLE %.gt_db2.tb04 (
name varchar,
salary integer
)
COMMENT ''
WITH (
- location = 'hdfs://%/user/iceberg/warehouse/TrinoQueryIT/gt_db2.db/tb04',
+ location = 'hdfs://%/user/iceberg/warehouse/TrinoQueryIT/gt_db2%/tb04',
sorted_by = ARRAY['name']
)"
CREATE TABLE
-"CREATE TABLE gt_iceberg.gt_db2.tb05 (
+"CREATE TABLE %.gt_db2.tb05 (
name varchar,
salary integer
)
COMMENT ''
WITH (
- location = 'hdfs://%/user/iceberg/warehouse/TrinoQueryIT/gt_db2.db/tb05',
+ location = 'hdfs://%/user/iceberg/warehouse/TrinoQueryIT/gt_db2%/tb05',
partitioning = ARRAY['name']
)"
CREATE TABLE
-"CREATE TABLE gt_iceberg.gt_db2.tb06 (
+"CREATE TABLE %.gt_db2.tb06 (
name varchar,
salary integer
)
COMMENT ''
WITH (
- location =
'hdfs://%/user/iceberg/warehouse/TrinoQueryIT/gt_iceberg/gt_db2/tb06'
+ location = 'hdfs://%/user/iceberg/warehouse/TrinoQueryIT/%/gt_db2/tb06'
)"
DROP TABLE
diff --git
a/trino-connector/integration-test/src/test/resources/trino-ci-testset/testsets/lakehouse-iceberg/00001_select_table.sql
b/trino-connector/integration-test/src/test/resources/trino-ci-testset/testsets/lakehouse-iceberg/00001_select_table.sql
index 16c2b23ee..814851389 100644
---
a/trino-connector/integration-test/src/test/resources/trino-ci-testset/testsets/lakehouse-iceberg/00001_select_table.sql
+++
b/trino-connector/integration-test/src/test/resources/trino-ci-testset/testsets/lakehouse-iceberg/00001_select_table.sql
@@ -1,28 +1,28 @@
-CREATE SCHEMA gt_iceberg.gt_db2;
+CREATE SCHEMA gt_db2;
-CREATE TABLE gt_iceberg.gt_db2.tb01 (
+CREATE TABLE gt_db2.tb01 (
name varchar,
salary int
);
-insert into gt_iceberg.gt_db2.tb01(name, salary) values ('sam', 11);
-insert into gt_iceberg.gt_db2.tb01(name, salary) values ('jerry', 13);
-insert into gt_iceberg.gt_db2.tb01(name, salary) values ('bob', 14), ('tom',
12);
+insert into gt_db2.tb01(name, salary) values ('sam', 11);
+insert into gt_db2.tb01(name, salary) values ('jerry', 13);
+insert into gt_db2.tb01(name, salary) values ('bob', 14), ('tom', 12);
-select * from gt_iceberg.gt_db2.tb01 order by name;
+select * from gt_db2.tb01 order by name;
-CREATE TABLE gt_iceberg.gt_db2.tb02 (
+CREATE TABLE gt_db2.tb02 (
name varchar,
salary int
);
-insert into gt_iceberg.gt_db2.tb02(name, salary) select * from
gt_iceberg.gt_db2.tb01 order by name;
+insert into gt_db2.tb02(name, salary) select * from gt_db2.tb01 order by name;
-select * from gt_iceberg.gt_db2.tb02 order by name;
+select * from gt_db2.tb02 order by name;
-drop table gt_iceberg.gt_db2.tb02;
+drop table gt_db2.tb02;
-drop table gt_iceberg.gt_db2.tb01;
+drop table gt_db2.tb01;
-drop schema gt_iceberg.gt_db2;
+drop schema gt_db2;
diff --git
a/trino-connector/integration-test/src/test/resources/trino-ci-testset/testsets/lakehouse-iceberg/00002_alter_table.sql
b/trino-connector/integration-test/src/test/resources/trino-ci-testset/testsets/lakehouse-iceberg/00002_alter_table.sql
index b31831e35..51a70ceb1 100644
---
a/trino-connector/integration-test/src/test/resources/trino-ci-testset/testsets/lakehouse-iceberg/00002_alter_table.sql
+++
b/trino-connector/integration-test/src/test/resources/trino-ci-testset/testsets/lakehouse-iceberg/00002_alter_table.sql
@@ -1,35 +1,35 @@
-CREATE SCHEMA gt_iceberg.gt_db2;
+CREATE SCHEMA gt_db2;
-CREATE TABLE gt_iceberg.gt_db2.tb01 (
+CREATE TABLE gt_db2.tb01 (
name varchar,
salary int,
city int
);
-alter table gt_iceberg.gt_db2.tb01 rename to gt_iceberg.gt_db2.tb03;
-show tables from gt_iceberg.gt_db2;
+alter table gt_db2.tb01 rename to gt_db2.tb03;
+show tables from gt_db2;
-alter table gt_iceberg.gt_db2.tb03 rename to gt_iceberg.gt_db2.tb01;
-show tables from gt_iceberg.gt_db2;
+alter table gt_db2.tb03 rename to gt_db2.tb01;
+show tables from gt_db2;
-alter table gt_iceberg.gt_db2.tb01 drop column city;
-show create table gt_iceberg.gt_db2.tb01;
+alter table gt_db2.tb01 drop column city;
+show create table gt_db2.tb01;
-alter table gt_iceberg.gt_db2.tb01 rename column name to s;
-show create table gt_iceberg.gt_db2.tb01;
+alter table gt_db2.tb01 rename column name to s;
+show create table gt_db2.tb01;
-alter table gt_iceberg.gt_db2.tb01 alter column salary set data type bigint;
-show create table gt_iceberg.gt_db2.tb01;
+alter table gt_db2.tb01 alter column salary set data type bigint;
+show create table gt_db2.tb01;
-comment on table gt_iceberg.gt_db2.tb01 is 'test table comments';
-show create table gt_iceberg.gt_db2.tb01;
+comment on table gt_db2.tb01 is 'test table comments';
+show create table gt_db2.tb01;
-comment on column gt_iceberg.gt_db2.tb01.s is 'test column comments';
-show create table gt_iceberg.gt_db2.tb01;
+comment on column gt_db2.tb01.s is 'test column comments';
+show create table gt_db2.tb01;
-alter table gt_iceberg.gt_db2.tb01 add column city varchar comment 'aaa';
-show create table gt_iceberg.gt_db2.tb01;
+alter table gt_db2.tb01 add column city varchar comment 'aaa';
+show create table gt_db2.tb01;
-drop table gt_iceberg.gt_db2.tb01;
+drop table gt_db2.tb01;
-drop schema gt_iceberg.gt_db2;
+drop schema gt_db2;
diff --git
a/trino-connector/integration-test/src/test/resources/trino-ci-testset/testsets/lakehouse-iceberg/00002_alter_table.txt
b/trino-connector/integration-test/src/test/resources/trino-ci-testset/testsets/lakehouse-iceberg/00002_alter_table.txt
index db285827f..b404f03e5 100644
---
a/trino-connector/integration-test/src/test/resources/trino-ci-testset/testsets/lakehouse-iceberg/00002_alter_table.txt
+++
b/trino-connector/integration-test/src/test/resources/trino-ci-testset/testsets/lakehouse-iceberg/00002_alter_table.txt
@@ -12,69 +12,69 @@ RENAME TABLE
DROP COLUMN
-"CREATE TABLE gt_iceberg.gt_db2.tb01 (
+"CREATE TABLE %.gt_db2.tb01 (
name varchar,
salary integer
)
COMMENT ''
WITH (
- location = 'hdfs://%/user/iceberg/warehouse/TrinoQueryIT/gt_db2.db/tb01'
+ location = 'hdfs://%/user/iceberg/warehouse/TrinoQueryIT/gt_db2%/tb01'
)"
RENAME COLUMN
-"CREATE TABLE gt_iceberg.gt_db2.tb01 (
+"CREATE TABLE %.gt_db2.tb01 (
s varchar,
salary integer
)
COMMENT ''
WITH (
- location = 'hdfs://%/user/iceberg/warehouse/TrinoQueryIT/gt_db2.db/tb01'
+ location = 'hdfs://%/user/iceberg/warehouse/TrinoQueryIT/gt_db2%/tb01'
)"
SET COLUMN TYPE
-"CREATE TABLE gt_iceberg.gt_db2.tb01 (
+"CREATE TABLE %.gt_db2.tb01 (
s varchar,
salary bigint
)
COMMENT ''
WITH (
- location = 'hdfs://%/user/iceberg/warehouse/TrinoQueryIT/gt_db2.db/tb01'
+ location = 'hdfs://%/user/iceberg/warehouse/TrinoQueryIT/gt_db2%/tb01'
)"
COMMENT
-"CREATE TABLE gt_iceberg.gt_db2.tb01 (
+"CREATE TABLE %.gt_db2.tb01 (
s varchar,
salary bigint
)
COMMENT 'test table comments'
WITH (
- location = 'hdfs://%/user/iceberg/warehouse/TrinoQueryIT/gt_db2.db/tb01'
+ location = 'hdfs://%/user/iceberg/warehouse/TrinoQueryIT/gt_db2%/tb01'
)"
COMMENT
-"CREATE TABLE gt_iceberg.gt_db2.tb01 (
+"CREATE TABLE %.gt_db2.tb01 (
s varchar COMMENT 'test column comments',
salary bigint
)
COMMENT 'test table comments'
WITH (
- location = 'hdfs://%/user/iceberg/warehouse/TrinoQueryIT/gt_db2.db/tb01'
+ location = 'hdfs://%/user/iceberg/warehouse/TrinoQueryIT/gt_db2%/tb01'
)"
ADD COLUMN
-"CREATE TABLE gt_iceberg.gt_db2.tb01 (
+"CREATE TABLE %.gt_db2.tb01 (
s varchar COMMENT 'test column comments',
salary bigint,
city varchar COMMENT 'aaa'
)
COMMENT 'test table comments'
WITH (
- location = 'hdfs://%/user/iceberg/warehouse/TrinoQueryIT/gt_db2.db/tb01'
+ location = 'hdfs://%/user/iceberg/warehouse/TrinoQueryIT/gt_db2%/tb01'
)"
DROP TABLE
diff --git
a/trino-connector/integration-test/src/test/resources/trino-ci-testset/testsets/lakehouse-iceberg/00006_datatype.sql
b/trino-connector/integration-test/src/test/resources/trino-ci-testset/testsets/lakehouse-iceberg/00006_datatype.sql
index 728545888..17f240edd 100644
---
a/trino-connector/integration-test/src/test/resources/trino-ci-testset/testsets/lakehouse-iceberg/00006_datatype.sql
+++
b/trino-connector/integration-test/src/test/resources/trino-ci-testset/testsets/lakehouse-iceberg/00006_datatype.sql
@@ -1,6 +1,6 @@
-CREATE SCHEMA gt_iceberg.gt_db2;
+CREATE SCHEMA gt_db2;
-USE gt_iceberg.gt_db2;
+USE gt_db2;
-- Unsupported Type: TINYINT, SMALLINT
CREATE TABLE tb01 (
@@ -64,4 +64,4 @@ drop table tb01;
drop table tb02;
-drop schema gt_iceberg.gt_db2;
+drop schema gt_db2;
diff --git
a/trino-connector/integration-test/src/test/resources/trino-ci-testset/testsets/lakehouse-iceberg/00006_datatype.txt
b/trino-connector/integration-test/src/test/resources/trino-ci-testset/testsets/lakehouse-iceberg/00006_datatype.txt
index ee97371a6..b0f26f6dd 100644
---
a/trino-connector/integration-test/src/test/resources/trino-ci-testset/testsets/lakehouse-iceberg/00006_datatype.txt
+++
b/trino-connector/integration-test/src/test/resources/trino-ci-testset/testsets/lakehouse-iceberg/00006_datatype.txt
@@ -4,7 +4,7 @@ USE
CREATE TABLE
-"CREATE TABLE gt_iceberg.gt_db2.tb01 (
+"CREATE TABLE %.gt_db2.tb01 (
f1 varchar,
f3 varbinary,
f4 decimal(10, 3),
@@ -20,7 +20,7 @@ CREATE TABLE
)
COMMENT ''
WITH (
- location = 'hdfs://%/user/iceberg/warehouse/TrinoQueryIT/gt_db2.db/tb01'
+ location = 'hdfs://%/user/iceberg/warehouse/TrinoQueryIT/gt_db2%/tb01'
)"
@@ -33,7 +33,7 @@ INSERT: 1 row
CREATE TABLE
-"CREATE TABLE gt_iceberg.gt_db2.tb02 (
+"CREATE TABLE %.gt_db2.tb02 (
f1 varchar NOT NULL,
f3 varbinary NOT NULL,
f4 decimal(10, 3) NOT NULL,
@@ -49,7 +49,7 @@ CREATE TABLE
)
COMMENT ''
WITH (
- location = 'hdfs://%/user/iceberg/warehouse/TrinoQueryIT/gt_db2.db/tb02'
+ location = 'hdfs://%/user/iceberg/warehouse/TrinoQueryIT/gt_db2%/tb02'
)"
INSERT: 1 row
diff --git
a/trino-connector/integration-test/src/test/resources/trino-ci-testset/testsets/lakehouse-iceberg/00007_varchar.sql
b/trino-connector/integration-test/src/test/resources/trino-ci-testset/testsets/lakehouse-iceberg/00007_varchar.sql
index ab1735174..3e5c8de75 100644
---
a/trino-connector/integration-test/src/test/resources/trino-ci-testset/testsets/lakehouse-iceberg/00007_varchar.sql
+++
b/trino-connector/integration-test/src/test/resources/trino-ci-testset/testsets/lakehouse-iceberg/00007_varchar.sql
@@ -1,6 +1,6 @@
-CREATE SCHEMA gt_iceberg.varchar_db2;
+CREATE SCHEMA gt_db2;
-USE gt_iceberg.varchar_db2;
+USE gt_db2;
CREATE TABLE tb01 (id int, name char(20));
@@ -10,9 +10,9 @@ CREATE TABLE tb03 (id int, name varchar(233));
CREATE TABLE tb04 (id int, name varchar);
-SHOW CREATE TABLE gt_iceberg.varchar_db2.tb04;
+SHOW CREATE TABLE tb04;
-drop table gt_iceberg.varchar_db2.tb04;
+drop table tb04;
-drop schema gt_iceberg.varchar_db2;
+drop schema gt_db2;
diff --git
a/trino-connector/integration-test/src/test/resources/trino-ci-testset/testsets/lakehouse-iceberg/00007_varchar.txt
b/trino-connector/integration-test/src/test/resources/trino-ci-testset/testsets/lakehouse-iceberg/00007_varchar.txt
index a32a0e860..2ab524c8d 100644
---
a/trino-connector/integration-test/src/test/resources/trino-ci-testset/testsets/lakehouse-iceberg/00007_varchar.txt
+++
b/trino-connector/integration-test/src/test/resources/trino-ci-testset/testsets/lakehouse-iceberg/00007_varchar.txt
@@ -10,13 +10,13 @@ USE
CREATE TABLE
-"CREATE TABLE gt_iceberg.varchar_db2.tb04 (
+"CREATE TABLE %.gt_db2.tb04 (
id integer,
name varchar
)
COMMENT ''
WITH (
- location =
'hdfs://%/user/iceberg/warehouse/TrinoQueryIT/varchar_db2.db/tb04'
+ location = 'hdfs://%/user/iceberg/warehouse/TrinoQueryIT/gt_db2%/tb04'
)"
DROP TABLE
diff --git
a/trino-connector/integration-test/src/test/resources/trino-ci-testset/testsets/lakehouse-iceberg/catalog_iceberg_mysql_cleanup.sql
b/trino-connector/integration-test/src/test/resources/trino-ci-testset/testsets/lakehouse-iceberg/catalog_iceberg_mysql_cleanup.sql
new file mode 100644
index 000000000..19d744acd
--- /dev/null
+++
b/trino-connector/integration-test/src/test/resources/trino-ci-testset/testsets/lakehouse-iceberg/catalog_iceberg_mysql_cleanup.sql
@@ -0,0 +1 @@
+CALL gravitino.system.drop_catalog('gt_iceberg_mysql');
diff --git
a/trino-connector/integration-test/src/test/resources/trino-ci-testset/testsets/lakehouse-iceberg/catalog_iceberg_mysql_prepare.sql
b/trino-connector/integration-test/src/test/resources/trino-ci-testset/testsets/lakehouse-iceberg/catalog_iceberg_mysql_prepare.sql
new file mode 100644
index 000000000..607be5081
--- /dev/null
+++
b/trino-connector/integration-test/src/test/resources/trino-ci-testset/testsets/lakehouse-iceberg/catalog_iceberg_mysql_prepare.sql
@@ -0,0 +1,17 @@
+call gravitino.system.create_catalog(
+ 'gt_iceberg_mysql',
+ 'lakehouse-iceberg',
+ map(
+ array['uri', 'catalog-backend', 'warehouse', 'jdbc-user',
'jdbc-password', 'jdbc-driver'],
+
array['${mysql_uri}/iceberg_db?createDatabaseIfNotExist=true&useSSL=false',
'jdbc',
+ '${hdfs_uri}/user/iceberg/warehouse/TrinoQueryIT', 'trino',
'ds123', 'com.mysql.cj.jdbc.Driver']
+ )
+);
+
+show catalogs;
+
+CREATE SCHEMA gt_iceberg_mysql.gt_db2;
+
+USE gt_iceberg_mysql.gt_db2;
+
+DROP SCHEMA gt_iceberg_mysql.gt_db2;
diff --git
a/trino-connector/integration-test/src/test/resources/trino-ci-testset/testsets/lakehouse-iceberg/catalog_iceberg_prepare.sql
b/trino-connector/integration-test/src/test/resources/trino-ci-testset/testsets/lakehouse-iceberg/catalog_iceberg_prepare.sql
index 0edcf4f29..46ad6a38c 100644
---
a/trino-connector/integration-test/src/test/resources/trino-ci-testset/testsets/lakehouse-iceberg/catalog_iceberg_prepare.sql
+++
b/trino-connector/integration-test/src/test/resources/trino-ci-testset/testsets/lakehouse-iceberg/catalog_iceberg_prepare.sql
@@ -7,4 +7,10 @@ call gravitino.system.create_catalog(
)
);
-show catalogs;
\ No newline at end of file
+show catalogs;
+
+CREATE SCHEMA gt_iceberg.gt_db2;
+
+USE gt_iceberg.gt_db2;
+
+DROP SCHEMA gt_iceberg.gt_db2;
\ No newline at end of file