Skip to content

Conversation

@edgarRd
Copy link
Contributor

@edgarRd edgarRd commented Jul 15, 2020

This PR fixes #1204 implementing name mapping for ORC.

@edgarRd
Copy link
Contributor Author

edgarRd commented Jul 15, 2020

@rdblue @rdsr @shardulm94 PTAL when you have a chance. Thanks!

@edgarRd edgarRd force-pushed the orc-name-mapping branch from a7c5068 to 106795d Compare July 15, 2020 19:47
@edgarRd edgarRd force-pushed the orc-name-mapping branch from 106795d to 2b365e8 Compare July 22, 2020 17:37
@edgarRd
Copy link
Contributor Author

edgarRd commented Jul 22, 2020

@rdsr @shardulm94 @rdblue I've updated this branch to latest master, PTAL when you have a chance. Thanks!

Comment on lines 342 to 343
assertTrue("TypeDescription schemas should be equal, not comparing Attributes",
typeDescriptionWithIds.equals(typeDescriptionWithIdsFromNameMapping, false /* checkAttributes */));
Copy link
Contributor

@shardulm94 shardulm94 Jul 23, 2020

Choose a reason for hiding this comment

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

If we are not comparing the attributes here, is there any value to adding this assert? Seems like name mapping's effect (assigning ids) is not actually being tested in this case.

Copy link
Contributor Author

@edgarRd edgarRd Jul 24, 2020

Choose a reason for hiding this comment

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

I've added a check for the IDs as well.

@rdblue
Copy link
Contributor

rdblue commented Jul 24, 2020

I'll try to get to this over the weekend. Sorry for not getting back to you sooner, I'm a bit behind with reviews.

this.schema = schema;
this.readerFunction = readerFunction;
this.file = file;
this.nameMapping = Optional.ofNullable(nameMapping).orElse(MappingUtil.create(schema));
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we also check if the file schema does not have ids before initializing nameMapping?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@edgarRd
Copy link
Contributor Author

edgarRd commented Jul 29, 2020

@rdsr @shardulm94 I think this is ready for another review. PTAL when you have a chance.

@edgarRd
Copy link
Contributor Author

edgarRd commented Aug 3, 2020

@rdblue @rdsr Let me know if there's any comment. Thanks!

Copy link
Contributor

@shardulm94 shardulm94 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! @rdsr Any further comments on this one?

Copy link
Contributor

@rdsr rdsr left a comment

Choose a reason for hiding this comment

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

+1

@edgarRd
Copy link
Contributor Author

edgarRd commented Aug 12, 2020

@rdblue do you have any additional comment? Thanks!

@rdsr rdsr merged commit 131c9c0 into apache:master Aug 18, 2020
@rdsr
Copy link
Contributor

rdsr commented Aug 18, 2020

Thanks @edgarRd . I just merged this!

@edgarRd
Copy link
Contributor Author

edgarRd commented Aug 18, 2020

Thanks @rdsr and @shardulm94 for the reviews and merging!

cmathiesen pushed a commit to ExpediaGroup/iceberg that referenced this pull request Aug 19, 2020
cmathiesen pushed a commit to ExpediaGroup/iceberg that referenced this pull request Aug 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ORC does not support Name Mapping of schemas with no Iceberg IDs

4 participants