Add support of creating iceberg table with existing data#14273
Add support of creating iceberg table with existing data#14273krvikash wants to merge 2 commits intotrinodb:masterfrom
Conversation
02fcfea to
5b2f382
Compare
5b2f382 to
9541ae7
Compare
|
There are few test cases in trino-iceberg where we create table using "with location", location does not exist and empty table gets created. These test cases are failing with this change. Current behaviour:
What will be the expected behaviour for the above two points? |
a373515 to
bdc8e86
Compare
bdc8e86 to
bf7995d
Compare
bf7995d to
7320e25
Compare
| int version = parseVersion(fileEntry.path()); | ||
| if (version > latestMetadataVersion) { |
There was a problem hiding this comment.
It is possible that there could be a tie here. For example, if two writers tried updating the table at the same time. If we detect that there is a tie for the highest version number, we should throw an exception.
There was a problem hiding this comment.
Will take care in register_table procedure.
|
Closing this pull request as we have decided to use |
|
PR #14375 raised for |
Description
This draft change supports creating an iceberg table using existing metadata and data.
https://trino.io/docs/current/connector/delta-lake.html#creating-tables
TODO: Add test cases
Syntax:
CREATE TABLE iceberg.default.source (dummy bigint) WITH (location= 'hdfs://hadoop-master:9000/user/hive/warehouse/iceberg_src_1-d7f665f9ece54a99bd7046f89f754b28' );User has to provide a dummy column. The column will be ignored and the columns from the metadata will be used to create the table.
Non-technical explanation
NA
Release notes
( ) This is not user-visible or docs only and no release notes are required.
(X) Release notes are required, please propose a release note for me.
( ) Release notes are required, with the following suggested text: