HIVE-29341:Iceberg: [V3] NULL initial default for STRUCT column#6565
Conversation
| public enum DefaultMetadataPolicy { | ||
| WRITE_DEFAULT, | ||
| WRITE_AND_INITIAL_DEFAULT | ||
| } |
There was a problem hiding this comment.
I don't think you need this at all, For ORC InitialDefault will be null and the end result will be same, at best we can directly pass isOrcTable if required. I won't though
There was a problem hiding this comment.
yes, corrected it avoided passing this argument and applied initial defaults to struct via a method created in HiveSchemaUtil.java
(Earlier, I was trying to apply intial defualts directly in convert internal step so introduced this enum because passing isOrc boolean value as a method argument to the existing methods doesn't seem right so introduced this new argument to describe the purpose of adding this argument more clearly )
402e933 to
50ca727
Compare
|
|
||
| @Test | ||
| public void testSimpleSchemaConvertToIcebergSchema() { | ||
| void testSimpleSchemaConvertToIcebergSchema() { |
ayushtkn
left a comment
There was a problem hiding this comment.
Thanx @ramitg254 for the work here.
Changes LGTM. There is one spotless warning around line length, I believe that can be fixed
Change-Id: Iefec29f3d2e320cd94e5944651d65e85471b5cb8
Change-Id: Iae36e3f24cdc1f1ced9e5cd827864e365ecc2a0b
Change-Id: Id2df9e65a64f876600882acffb6df2f628559e1e
Change-Id: If7fc697834eda9924177d648a9e96e8e149d7c7d
|



What changes were proposed in this pull request?
support initial default for struct
Why are the changes needed?
currently initial default specified for struct isn't get read and stays null.
Does this PR introduce any user-facing change?
yes initial default values will be seen in previous rows
How was this patch tested?
unit tests and ci results