Skip to content

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

Merged
gszadovszky merged 5 commits into
apache:masterfrom
pratyush-sharma-2025:fix-int96-read-issue
Jan 30, 2025
Merged

GH-3115-Fix int96 read issue in complex type#3118
gszadovszky merged 5 commits into
apache:masterfrom
pratyush-sharma-2025:fix-int96-read-issue

Conversation

@pratyush-sharma-2025

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

Copy link
Copy Markdown
Contributor

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
Copy Markdown
ContributorAuthor

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

@pratyush-sharma-2025

Copy link
Copy Markdown
ContributorAuthor

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

@gszadovszkygszadovszky left a comment

Copy link
Copy Markdown
Contributor

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.

Comment threadparquet-avro/src/main/java/org/apache/parquet/avro/AvroRecordConverter.java Outdated
Comment threadparquet-avro/src/main/java/org/apache/parquet/avro/AvroSchemaConverter.java Outdated

@gszadovszkygszadovszky left a comment

Copy link
Copy Markdown
Contributor

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:masterJan 30, 2025
Sign up for freeto 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

@pratyush-sharma-2025@gszadovszky