Skip to content

Conversation

@edgarRd
Copy link
Contributor

@edgarRd edgarRd commented Oct 18, 2021

Adding name mapping to readers built in IcebergInputFormat. This will allow Hive to read data imported during Hive -> Iceberg table migration, which otherwise fails with NPE while trying to resolve the Iceberg types in the parquet/orc files.

Since the change is pretty straightforward - and we have this same behavior in all other readers - I've not added more unit tests. We also already have extensive name mapping unit tests. However, if folks feel we need a unit test for this I'm happy to add it. I've validated this change by reading via Hive using the IcebergInputFormat on a migrated table.

PTAL @pvary @aokolnychyi

@github-actions github-actions bot added the MR label Oct 18, 2021
if (reuseContainers) {
avroReadBuilder.reuseContainers();
}
if (nameMapping != null) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: empty line bewteen control flow statements

Copy link
Contributor

@rdblue rdblue left a comment

Choose a reason for hiding this comment

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

Looks good to me. A minor nit on formatting, but otherwise good.

@rdblue rdblue merged commit 34e72b5 into apache:master Oct 18, 2021
@rdblue
Copy link
Contributor

rdblue commented Oct 18, 2021

Thanks, @edgarRd!

@edgarRd
Copy link
Contributor Author

edgarRd commented Oct 18, 2021

Thanks, @rdblue!

@edgarRd edgarRd deleted the mr-name-mapping branch October 19, 2021 14:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants