-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
GH-3115-Fix int96 read issue in complex type #3118
Conversation
@Fokko @gszadovszky @wgtmac Can you please take a look when you have a chance? |
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.
Thanks for working on this, @pratyush-sharma-2025. I think you can simplify your code greatly. See my comment in the code.
parquet-avro/src/main/java/org/apache/parquet/avro/AvroRecordConverter.java
Outdated
Show resolved
Hide resolved
parquet-avro/src/test/java/org/apache/parquet/avro/TestAvroSchemaConverter.java
Outdated
Show resolved
Hide resolved
parquet-avro/src/main/java/org/apache/parquet/avro/AvroSchemaConverter.java
Outdated
Show resolved
Hide resolved
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.
Thanks, @pratyush-sharma-2025. Everything looks good.
Let me wait for an additional day before committing so others have the chance to object.
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?
AvroSchemaConverter(boolean assumeRepeatedIsListElement, ParquetConfiguration conf)
while checking if the given type is element type of a list inAvroRecordConverter#isElementType()
Are these changes tested?
Added a new test case
TestArrayCompatibility#testIsElementTypeInt96Element()
Are there any user-facing changes?
No.
Closes #3115