-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix failure when ACID table column name collides with ACID internal names #12401
Conversation
CI hit #12405 |
@@ -3411,29 +3405,12 @@ private static Function<HiveColumnHandle, ColumnMetadata> columnMetadataGetter(T | |||
} | |||
} | |||
|
|||
// add hidden columns | |||
builder.put(PATH_COLUMN_NAME, Optional.empty()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why removed?
"test_hidden_column_name_conflict", | ||
format("(\"%s\" int, _bucket int, _partition int) WITH (partitioned_by = ARRAY['_partition'], bucketed_by = ARRAY['_bucket'], bucket_count = 10)", columnName))) { | ||
assertThatThrownBy(() -> query("SELECT * FROM " + table.getName())) | ||
.hasMessageContaining("Multiple entries with same key: " + columnName); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We would probably want disallow creation of such tables
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Filed #12449
What problem(s) is this fixing? |
@findepi The below Map<String, Optional<String>> columnComment = builder.buildOrThrow(); |
Thanks for explanation. This makes this change clear to me now. Please add mention of that in the commit message |
75c352f
to
a3646b4
Compare
@findepi Updated the commit message. |
a3646b4
to
4eff038
Compare
pushed; updated the commit title only. |
…ames Previously, HiveMetadata.columnMetadataGetter threw an exception due to duplicated keys when the table contains column names of ACID format columns (e.g. operation) and it's ACID table.
4eff038
to
cc9bede
Compare
Description
Fix failure when building column metadata in Hive
Documentation
(x) No documentation is needed.
Release notes
(x) Release notes entries required with the following suggested text: