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#1510] feat(trino-connector): Support partition, distribution …
…and sort order of Hive table created by Trino (apache#1539) ### What changes were proposed in this pull request? We can create a Hive table with partitioning, distribution, and sorting ordered by Trino. ### Why are the changes needed? It's a crucial feature of the Trino connector. Fix: apache#1510 ### Does this PR introduce _any_ user-facing change? User can create a hive table in Trino by: ``` create table t10 (id int, name varchar) with (partitioned_by = ARRAY['name'], bucketed_by = ARRAY['id'], bucket_count = 50); ``` Or create a Hive table and loaded by Trino like ``` trino:db2> show create table t11; Create Table ---------------------------------------------------------------------------------- CREATE TABLE "test.hive_catalog".db2.t11 ( id integer, name varchar(65535) ) COMMENT '' WITH ( bucket_count = 50, bucketed_by = ARRAY['id'], input_format = 'org.apache.hadoop.mapred.TextInputFormat', location = 'hdfs://localhost:9000/user/hive/warehouse/db2.db/t11', output_format = 'org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat', partitioned_by = ARRAY['name'], serde_lib = 'org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe', serde_name = 't11', table_type = 'MANAGED_TABLE' ) (1 row) ``` ### How was this patch tested? Add some IT --------- Co-authored-by: Jerry Shao <[email protected]>
- Loading branch information
Showing
10 changed files
with
464 additions
and
12 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
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
Oops, something went wrong.