diff --git a/integration-test-common/docker-script/init/trino/init.sh b/integration-test-common/docker-script/init/trino/init.sh index b997090ef0b..006a35f0e67 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 af282adddbf..676bcb62898 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 static void main(String[] args) throws Exception { 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 a2936fb1316..dc545884b2b 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 d7cbbec0bb3..2cea55a45b2 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 16c2b23ee27..814851389bc 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 b31831e3570..51a70ceb178 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 db285827f59..b404f03e5de 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 72854588809..17f240edd9d 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 ee97371a6b0..b0f26f6dd84 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 ab17351747b..3e5c8de757f 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 a32a0e8604a..2ab524c8dd4 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 00000000000..19d744acd47 --- /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 00000000000..607be508184 --- /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 0edcf4f29f3..46ad6a38cee 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