Skip to content
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

Make parquet extension correctly parse List #5465

Closed
wants to merge 1 commit into from

Conversation

gauravkumar37
Copy link
Contributor

Fixes #5433
This change makes Parquet input row reader corrects handle List data type.
Code is inspired from the avro extension since parquet extension also defers the schema handling logic to avro extension.

Fixes apache#5433
This change makes Parquet input row reader corrects handle List data type.
@gauravkumar37
Copy link
Contributor Author

Failed build is due to a timeout exception in kafka-indexing-service tests, unrelated to my PR. Can somebody retrigger the build?

@@ -89,6 +91,9 @@ public boolean containsValue(Object value)
public Object get(Object key)
{
Object field = record.get(key.toString());
if (field instanceof ArrayList) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it possible to get a List that isn't an ArrayList here?

@@ -89,6 +91,9 @@ public boolean containsValue(Object value)
public Object get(Object key)
{
Object field = record.get(key.toString());
if (field instanceof ArrayList) {
return Lists.transform((ArrayList) field, item -> String.valueOf(((GenericRecord) item).get(0)));
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you include a unit test for this, verifying the behavior works as expected?

@gianm
Copy link
Contributor

gianm commented Apr 6, 2018

Hi @gauravkumar37, are you still interested in pursuing this contribution? If so, please let us know if the review comments were helpful.

@gianm
Copy link
Contributor

gianm commented Oct 15, 2018

Hi @gauravkumar37, some similar functionality is added in #6360, so we'll close this PR. But thank you anyway!

@gianm gianm closed this Oct 15, 2018
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.

3 participants