Show Iceberg table version in SHOW CREATE TABLE#11980
Conversation
|
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please submit the signed CLA to cla@trino.io. For more information, see https://github.com/trinodb/cla. |
|
@findepi Hi findepi, excuse me, can you help me to review this pr? In addition, I submitted a cla yesterday, but I haven't received a reply yet, so the current pr submission may fail the verification, which can be ignored for now. Thank you very much! |
|
@polaris6 thank you for your PR! cc @martint on the CLA question cc @alexjo2144 |
plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergMetadata.java
Outdated
Show resolved
Hide resolved
|
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please submit the signed CLA to cla@trino.io. For more information, see https://github.com/trinodb/cla. |
There was a problem hiding this comment.
That table is based on org.apache.iceberg.Table#properties so the contents of the table aren't very strict. There could be a key/value entry for anything in this class, if the table was made or altered in Spark https://github.com/apache/iceberg/blob/master/core/src/main/java/org/apache/iceberg/TableProperties.java
I"m not sure how to make that clear in the docs though
There was a problem hiding this comment.
The example should include properties a user is most likely to see.
format-version doesn't seem to be one of them, so it's a good change to remove it from here.
let's consider this sufficient for this PR
There was a problem hiding this comment.
In iceberg's metadata file, format-version is an element at the same level as properties and will not be included in
properties. A sample metadata file is as follows:
{
"format-version" : 1,
"location" : "hdfs://testOnline/data/iceberg/warehouse/test.db/demo",
"partition-spec" : [ {
"name" : "dteventtimestamp_hour",
"transform" : "hour",
"source-id" : 5,
"field-id" : 1000
} ],
"properties" : {
"commit.retry.max-wait-ms" : "3000",
"max.compact.file.size" : "4194304",
"commit.retry.total-timeout-ms" : "100000",
"preserve.snapshot.days" : "3",
"preserve.snapshot.nums" : "10",
"write.format.default" : "parquet",
"max.rewrite.files" : "3000",
"write.metadata.delete-after-commit.enabled" : "true",
"commit.retry.num-retries" : "2000",
"commit.retry.min-wait-ms" : "100"
},
"current-snapshot-id" : 1234567890123,
"...": "..."
}We can refer to these, show create table returns elements such as format-version, location, partition, etc. $properties returns properties in iceberg metadata.
|
@polaris6 can you please squash commits and perhaps change commit message to something like the following |
2823bc3 to
73d5f1d
Compare
|
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please submit the signed CLA to cla@trino.io. For more information, see https://github.com/trinodb/cla. |
|
@findepi Thank you for your suggestion, I resubmitted it, do you think this is ok? |
|
@polaris6 thanks! |
73d5f1d to
59d629c
Compare
|
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please submit the signed CLA to cla@trino.io. For more information, see https://github.com/trinodb/cla. |
|
@findepi Thank you for your suggestion, I resubmitted it. |
|
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please submit the signed CLA to cla@trino.io. For more information, see https://github.com/trinodb/cla. |
|
@findepi Hello findepi, sorry to bother you, I fixed the failed test case and submitted a commit, could you please help me to trigger the workflow? After the workflow is executed, I will squash commits. |
|
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please submit the signed CLA to cla@trino.io. For more information, see https://github.com/trinodb/cla. |
|
@polaris6 please squash the commits and ping here for workflow re-run. |
Include `format_version` table property in `SHOW CREATE TABLE` output. This also fixes a doc entry about `$properties` system table. The `format-version` property isn't returned there.
785b873 to
efa9198
Compare
|
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please submit the signed CLA to cla@trino.io. For more information, see https://github.com/trinodb/cla. |
|
@cla-bot check |
|
The cla-bot has been summoned, and re-checked this pull request! |


When doing a

show create tableoperation for a iceberg table, trino does not return the format-version property:Therefore the content of this part of the document is incorrect:

I made some modifications to show this property. The first step is to create a table:

Before the modification, the result of

show create tableis like this:After the modification, the result of

show create tableis like this: