Uh oh!
There was an error while loading. Please reload this page.
[Parquet] Add support to read Parquet files written with old 2-level list structures. - #3774
Conversation
SinghAsDev
commented
Dec 19, 2021
@rdblue@RussellSpitzer can you help review this? Thanks |
Uh oh!
There was an error while loading. Please reload this page.
jackye1995
commented
Dec 22, 2021
3773 is merged, could you rebase? |
SinghAsDev
commented
Dec 28, 2021
@jackye1995 done |
wizardxz
commented
Jan 4, 2022
LGTM |
SinghAsDev
commented
Jan 10, 2022
@jackye1995@RussellSpitzer@kbendick@rdblue can I get a review on this, thanks |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
…et-thrift. Also rename ParquetSchemaUtil.isListElementType to ParquetSchemaUtil.isOldListElementType
RussellSpitzer
left a comment
There was a problem hiding this comment.
This looks good to me, but I'm not a parquet expert so @rdblue could you also take a quick look before we merge?
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
| T elementResult = null; | ||
| if (repeatedElement.getFieldCount() > 0) { | ||
| Type elementField = repeatedElement.getType(0); | ||
| if (repeatedElement.isPrimitive() || repeatedElement.asGroupType().getFieldCount() > 0) { |
There was a problem hiding this comment.
The changes to this class are inconsistent with the changes to the TypeWithSchemaVisitor. Here, the repeated element is always visited (beforeRepeatedElement call above) and may be processed again as the element. The other avoids pushing the name on the stack. If beforeRepeatedElement were used to track names, I think it would get a duplicate name for the repeated group.
There was a problem hiding this comment.
Thanks, addressed this. It would be nice to have some tests to check this behavior. But, I don't think we need to block on that, unless you disagree.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
| private static <T> T visitTwoLevelList(Types.ListType iListType, Types.NestedField iListElement, GroupType pListType, | ||
| Type pListElement, TypeWithSchemaVisitor<T> visitor) { | ||
| T elementResult = visitField(iListElement, pListElement, visitor); | ||
There was a problem hiding this comment.
Style: extra newline. Also, we either wrap argument lists at the same level or start all arguments on the next line at 2 indents.
There was a problem hiding this comment.
I think the style used in various parts of code are different. For example, IIUC ParquetReadSupport.prepareForRead is different than what you are saying. Earlier you also had mentioned Iceberg does not use new param at new line pattern. Updating this part to keep the same level (align params start with previous line) and wrap.
Let me know which style we should try to follow and I can try to update the intellij-style that we provide with Iceberg repo accordingly. I don't know if it is possible, but I can try.
There was a problem hiding this comment.
Don't worry about where still is incorrect in other places. We'll eventually track those down and fix them, but we do want to keep style from diverging when it is caught by a review. So please do fix this.
There was a problem hiding this comment.
It should already be fixed. Does the update still have style issue?
rdblue
commented
Jan 28, 2022
@SinghAsDev, I did another round of review. This also still needs to update Iceberg generics, I think. |
SinghAsDev
commented
Jan 30, 2022
Thanks for thorough reviews @rdblue ! I thought I already covered the Iceberg generic with this change. Am I missing something? |
@SinghAsDev, looks like it is missing a test for Iceberg generics. I see the update for it now. Thanks! |
…ment needs to be popped out after visiting list.
rdblue
commented
Feb 1, 2022
Thanks, @SinghAsDev! |
Add support to read Parquet files written with old 2-level list structures. This should resolve#3759.