-
Notifications
You must be signed in to change notification settings - Fork 383
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#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
- Loading branch information
Showing
14 changed files
with
129 additions
and
94 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 21 additions & 21 deletions
42
...est/src/test/resources/trino-ci-testset/testsets/lakehouse-iceberg/00000_create_table.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,78 +1,78 @@ | ||
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 ( | ||
partitioning = ARRAY['name'], | ||
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 ( | ||
partitioning = ARRAY['name'], | ||
sorted_by = ARRAY['salary_wrong_name'] | ||
); | ||
|
||
CREATE TABLE gt_iceberg.gt_db2.tb03 ( | ||
CREATE TABLE gt_db2.tb03 ( | ||
name varchar, | ||
salary int | ||
) with ( | ||
partitioning = ARRAY['name'], | ||
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; | ||
drop schema gt_db2; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 12 additions & 12 deletions
24
...est/src/test/resources/trino-ci-testset/testsets/lakehouse-iceberg/00001_select_table.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; |
40 changes: 20 additions & 20 deletions
40
...test/src/test/resources/trino-ci-testset/testsets/lakehouse-iceberg/00002_alter_table.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.