Skip to content

Fixes parquet uint_32 datatype conversion#13935

Merged
abhishekagarwal87 merged 2 commits intoapache:masterfrom
tejaswini-imply:fix-parquet-read-uint32-bug
Mar 16, 2023
Merged

Fixes parquet uint_32 datatype conversion#13935
abhishekagarwal87 merged 2 commits intoapache:masterfrom
tejaswini-imply:fix-parquet-read-uint32-bug

Conversation

@tejaswini-imply
Copy link
Member

@tejaswini-imply tejaswini-imply commented Mar 15, 2023

Description:

After parquet ingestion, uint_32 parquet datatypes are stored as null values in the dataSource. This PR fixes this conversion bug.


Key changed/added classes in this PR
  • ParquetGroupConverter.java

This PR has:

  • been self-reviewed.
  • added comments explaining the "why" and the intent of the code wherever would not be obvious for an unfamiliar reader.
  • added unit tests or modified existing tests to cover new code paths, ensuring the threshold for code coverage is met.
  • added integration tests.
  • been tested in a test Druid cluster.

@tejaswini-imply
Copy link
Member Author

@clintropolis Could you please review this PR?

Copy link
Member

@clintropolis clintropolis left a comment

Choose a reason for hiding this comment

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

my bad on introducing this bug, thanks for the fix 👍

case UINT_16:
return g.getInteger(fieldIndex, index);
case UINT_32:
return g.getInteger(fieldIndex, index) & (-1L >>> 32);
Copy link
Member

Choose a reason for hiding this comment

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

this could also use Integer.toUnsignedLong

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed it, Thanks.

@abhishekagarwal87 abhishekagarwal87 merged commit 6837289 into apache:master Mar 16, 2023
@clintropolis clintropolis added this to the 26.0 milestone Apr 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants