Fix issue while using iceberg table property format_version#19779
Fix issue while using iceberg table property format_version#19779yingsu00 merged 1 commit intoprestodb:masterfrom
Conversation
|
Can we add a test for this? |
f20d001 to
701a914
Compare
|
@nmahadevuni Added the tests, please review. |
701a914 to
15607fe
Compare
|
Looks good. |
|
LGTM as well 👍🏻 |
yingsu00
left a comment
There was a problem hiding this comment.
Looks good, just a few nits. Once fixed I'll merge.
There was a problem hiding this comment.
I know you're referencing testCreatePartitionedTableAs, but the formatting doesn't look good in IntelliJ. This statement uses format() but for format_version, it's using +. Would you please use a unified way? I think the createTable stmt looks better. Also I don't know why this string uses "\n" while the above one doesn't.
There was a problem hiding this comment.
I have made the change and used format for all the strings.
Also I don't know why this string uses "\n" while the above one doesn't.
The first string is SQL query to run to create the test table and this string is the output for SHOW CREATE TABLE statement in Presto. This is how presto prints the output so to assert the output with expected output we need to add /n in the string.
There was a problem hiding this comment.
This annotation was not added here because code editors like IntelliJ are not able to detect the language in the case of format strings. So, even after using this annotation, it doesn't benefit as language injection doesn't take place.
Fixes prestodb#19778: The value of the table property format_version was not getting passed on to the iceberg library when iceberg.catalog.type was hive
imjalpreet
left a comment
There was a problem hiding this comment.
Thanks @yingsu00 for the review. I have made the changes and added my comments.
There was a problem hiding this comment.
This annotation was not added here because code editors like IntelliJ are not able to detect the language in the case of format strings. So, even after using this annotation, it doesn't benefit as language injection doesn't take place.
There was a problem hiding this comment.
I have made the change and used format for all the strings.
Also I don't know why this string uses "\n" while the above one doesn't.
The first string is SQL query to run to create the test table and this string is the output for SHOW CREATE TABLE statement in Presto. This is how presto prints the output so to assert the output with expected output we need to add /n in the string.
15607fe to
59effe3
Compare
Fixes #19778: The value of the table property format_version was not getting passed on to the iceberg library when iceberg.catalog.type was hive
Test plan -
The bug mentioned in the above Issue is fixed after this change. Example below:
Screenshot of the metadata file located at s3://iceberg/iceberg_customers_v2/metadata/00000-c691f310-d837-4107-8687-21872f5ae5da.metadata.json