-
Notifications
You must be signed in to change notification settings - Fork 2.9k
ORC: Add name mapping support #1208
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
Conversation
|
@rdblue @rdsr @shardulm94 PTAL when you have a chance. Thanks! |
a7c5068 to
106795d
Compare
106795d to
2b365e8
Compare
|
@rdsr @shardulm94 @rdblue I've updated this branch to latest master, PTAL when you have a chance. Thanks! |
| assertTrue("TypeDescription schemas should be equal, not comparing Attributes", | ||
| typeDescriptionWithIds.equals(typeDescriptionWithIdsFromNameMapping, false /* checkAttributes */)); |
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.
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.
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.
I've added a check for the IDs as well.
|
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)); |
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.
Should we also check if the file schema does not have ids before initializing nameMapping?
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.
Done.
orc/src/test/java/org/apache/iceberg/orc/TestExpressionToSearchArgument.java
Outdated
Show resolved
Hide resolved
- Projection on complex types: maps, lists, structs
|
@rdsr @shardulm94 I think this is ready for another review. PTAL when you have a chance. |
shardulm94
left a comment
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.
Looks good to me! @rdsr Any further comments on this one?
orc/src/test/java/org/apache/iceberg/orc/TestExpressionToSearchArgument.java
Outdated
Show resolved
Hide resolved
rdsr
left a comment
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.
+1
|
@rdblue do you have any additional comment? Thanks! |
|
Thanks @edgarRd . I just merged this! |
|
Thanks @rdsr and @shardulm94 for the reviews and merging! |
This PR fixes #1204 implementing name mapping for ORC.