Skip to content
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

Allow changing field type in records wrapped in a map #24248

Merged
merged 1 commit into from
Nov 27, 2024

Conversation

ebyhr
Copy link
Member

@ebyhr ebyhr commented Nov 25, 2024

Description

Support changing key and value types in MAP type with synthetic key and value fields.
Relates to #16959

Release notes

## General, Iceberg
* Add support for changing field types inside a map. ({issue}`24248`)

@github-actions github-actions bot added the iceberg Iceberg connector label Nov 25, 2024
try (TestTable table = new TestTable(getQueryRunner()::execute, "test_set_field_type_in_map", tableDefinition)) {
assertThat(getColumnType(table.getName(), "col")).isEqualTo("map(integer, row(field integer))");

assertUpdate("ALTER TABLE " + table.getName() + " ALTER COLUMN col.value.field SET DATA TYPE bigint");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Potential follow-up:
Please consider documenting how to update the type of map key/value types on https://trino.io/docs/current/sql/alter-table.html

cc @mosabua

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#18546 is the relevant issue.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jhlodin @Ordinant .. can you look at this .. I wont be able to get to this

@ebyhr ebyhr force-pushed the ebi/core-set-column-type-map branch from feb8f6a to aa50572 Compare November 26, 2024 12:15
@ebyhr ebyhr force-pushed the ebi/core-set-column-type-map branch from aa50572 to 9d98c66 Compare November 27, 2024 04:23
@cla-bot cla-bot bot added the cla-signed label Nov 27, 2024
@ebyhr
Copy link
Member Author

ebyhr commented Nov 27, 2024

Going to merge as we already agreed on the syntax in #16959

@ebyhr ebyhr merged commit 2829a6d into trinodb:master Nov 27, 2024
93 checks passed
@ebyhr ebyhr deleted the ebi/core-set-column-type-map branch November 27, 2024 06:26
@github-actions github-actions bot added this to the 466 milestone Nov 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed iceberg Iceberg connector
Development

Successfully merging this pull request may close these issues.

4 participants