forked from apache/gravitino
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[apache#2417] feat(trino-connector): Support update catalog operation…
…s in trino-connector (apache#2564) ### What changes were proposed in this pull request? Trino connector support stored procedure to update catalog attributes. ### Why are the changes needed? FEATURE: apache#2417 ### Does this PR introduce _any_ user-facing change? Add stored procedure alter_catalog. ### How was this patch tested? Add new IT
- Loading branch information
Showing
17 changed files
with
477 additions
and
117 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
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
File renamed without changes.
File renamed without changes.
41 changes: 41 additions & 0 deletions
41
...tion-test/src/test/resources/trino-ci-testset/testsets/jdbc-mysql/00008_alter_catalog.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 |
---|---|---|
@@ -0,0 +1,41 @@ | ||
call gravitino.system.create_catalog( | ||
'gt_mysql_xxx1', | ||
'jdbc-mysql', | ||
map( | ||
array['jdbc-url', 'jdbc-user', 'jdbc-password', 'jdbc-driver'], | ||
array['${mysql_uri}/?useSSL=false', 'trino', 'ds123', 'com.mysql.cj.jdbc.Driver'] | ||
) | ||
); | ||
|
||
select * from gravitino.system.catalog where name = 'test.gt_mysql_xxx1'; | ||
|
||
call gravitino.system.alter_catalog( | ||
'gt_mysql_xxx1', | ||
map( | ||
array['join-pushdown.strategy', 'test_key'], | ||
array['EAGER', 'test_value'] | ||
) | ||
); | ||
|
||
select * from gravitino.system.catalog where name = 'test.gt_mysql_xxx1'; | ||
|
||
call gravitino.system.alter_catalog( | ||
'gt_mysql_xxx1', | ||
map(), | ||
array['join-pushdown.strategy'] | ||
); | ||
|
||
select * from gravitino.system.catalog where name = 'test.gt_mysql_xxx1'; | ||
|
||
call gravitino.system.alter_catalog( | ||
catalog => 'gt_mysql_xxx1', | ||
set_properties => map( | ||
array['join-pushdown.strategy'], | ||
array['EAGER'] | ||
), | ||
remove_properties => array['test_key'] | ||
); | ||
|
||
select * from gravitino.system.catalog where name = 'test.gt_mysql_xxx1'; | ||
|
||
call gravitino.system.drop_catalog('gt_mysql_xxx1'); |
17 changes: 17 additions & 0 deletions
17
...tion-test/src/test/resources/trino-ci-testset/testsets/jdbc-mysql/00008_alter_catalog.txt
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
CALL | ||
|
||
"test.gt_mysql_xxx1","jdbc-mysql","{jdbc-url=jdbc:mysql://%/?useSSL=false, jdbc-user=trino, jdbc-password=ds123, jdbc-driver=com.mysql.cj.jdbc.Driver}" | ||
|
||
CALL | ||
|
||
"test.gt_mysql_xxx1","jdbc-mysql","{join-pushdown.strategy=EAGER, test_key=test_value, jdbc-url=jdbc:mysql://%/?useSSL=false, jdbc-user=trino, jdbc-password=ds123, jdbc-driver=com.mysql.cj.jdbc.Driver}" | ||
|
||
CALL | ||
|
||
"test.gt_mysql_xxx1","jdbc-mysql","{test_key=test_value, jdbc-url=jdbc:mysql://%/?useSSL=false, jdbc-user=trino, jdbc-password=ds123, jdbc-driver=com.mysql.cj.jdbc.Driver}" | ||
|
||
CALL | ||
|
||
"test.gt_mysql_xxx1","jdbc-mysql","{join-pushdown.strategy=EAGER, jdbc-url=jdbc:mysql://%/?useSSL=false, jdbc-user=trino, jdbc-password=ds123, jdbc-driver=com.mysql.cj.jdbc.Driver}" | ||
|
||
CALL |
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.