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

GH-3115-Fix int96 read issue in complex type #3118

Merged
merged 5 commits into from
Jan 30, 2025

Conversation

pratyush-sharma-2025
Copy link
Contributor

@pratyush-sharma-2025 pratyush-sharma-2025 commented Jan 10, 2025

Rationale for this change

There is an issue with reading of INT96 timestamp when they are present in a complex data type such as List.
It gives the following error -
Exception in thread "main" java.lang.IllegalArgumentException: INT96 is deprecated. As interim enable READ_INT96_AS_FIXED flag to read as byte array.

More details are present here.

What changes are included in this PR?

  • Use AvroSchemaConverter(boolean assumeRepeatedIsListElement, ParquetConfiguration conf) while checking if the given type is element type of a list in AvroRecordConverter#isElementType()

Are these changes tested?

Added a new test case TestArrayCompatibility#testIsElementTypeInt96Element()

Are there any user-facing changes?

No.

Closes #3115

@pratyush-sharma-2025
Copy link
Contributor Author

@rdblue @tomwhite Can you please help review here? Thanks!

@pratyush-sharma-2025
Copy link
Contributor Author

@Fokko @gszadovszky @wgtmac Can you please take a look when you have a chance?

Copy link
Contributor

@gszadovszky gszadovszky left a comment

Choose a reason for hiding this comment

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

Thanks for working on this, @pratyush-sharma-2025. I think you can simplify your code greatly. See my comment in the code.

Copy link
Contributor

@gszadovszky gszadovszky left a comment

Choose a reason for hiding this comment

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

Thanks, @pratyush-sharma-2025. Everything looks good.
Let me wait for an additional day before committing so others have the chance to object.

@gszadovszky gszadovszky merged commit bb4f867 into apache:master Jan 30, 2025
7 checks passed
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.

Fail to read INT96Timestamp from a list
2 participants