Skip to content

Conversation

@openinx
Copy link
Member

@openinx openinx commented Apr 22, 2020

No description provided.

return primitiveType.getPrimitiveTypeName() == PrimitiveType.PrimitiveTypeName.INT32;
}

public static String[] currentPath(Deque<String> fieldNames) {
Copy link
Contributor

Choose a reason for hiding this comment

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

This implementation is too tied to how the Deque is used. I would expect iterating over the object passed in to create the right name, but this assumes it needs to use descendingIterator(). How about updating these methods to accept Iterator<String> instead so that they aren't tightly coupled to the original use?

Copy link
Member Author

Choose a reason for hiding this comment

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

It's not appropriate to put the two methods in ParquetUtil.java, I've moved them out of the utility class. Thanks.

Copy link
Contributor

Choose a reason for hiding this comment

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

That works for me.

@rdblue
Copy link
Contributor

rdblue commented Apr 22, 2020

Thanks, @openinx! It looks good except for the confusing behavior of these methods when moved to a utility class. I think we can fix that by altering the method arguments.

@rdblue rdblue merged commit e990796 into apache:master Apr 23, 2020
rdblue added a commit to rdblue/iceberg that referenced this pull request May 4, 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.

2 participants