You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@parquet.apache.org by "arnabnandy7 (via GitHub)" <gi...@apache.org> on 2026/08/13 12:52:10 UTC

[PR] GH-3715: Validate dictionary IDs while decoding [parquet-java]

arnabnandy7 opened a new pull request, #3718:
URL: https://github.com/apache/parquet-java/pull/3718

   ### Rationale for this change
   
   Dictionary-encoded data pages may contain an ID that exceeds the valid range of the associated dictionary. Currently, this causes an `ArrayIndexOutOfBoundsException` when the dictionary implementation accesses its backing array, obscuring the actual data corruption.
   
   ### What changes are included in this PR?
   
   - Validate decoded dictionary IDs against the dictionary's maximum ID.
   - Throw a descriptive `ParquetDecodingException` when an ID is outside the valid range.
   - Apply validation to typed value reads and `readValueDictionaryId()`.
   - Add a regression test covering an out-of-range dictionary ID.
   
   ### Are these changes tested?
   
   Yes. A unit test constructs a dictionary-encoded page containing an out-of-range ID and verifies that reading it throws a descriptive `ParquetDecodingException`.
   
   ```shell
   ./mvnw -pl parquet-column -Dtest=TestDictionary test
   ```
   
   ### Are there any user-facing changes?
   
   Yes. Corrupt dictionary-encoded data now produces a descriptive `ParquetDecodingException` instead of exposing an internal `ArrayIndexOutOfBoundsException`. Valid Parquet files are unaffected.
   
   Closes #3715
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@parquet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@parquet.apache.org
For additional commands, e-mail: issues-help@parquet.apache.org


Re: [PR] GH-3715: Validate dictionary IDs while decoding [parquet-java]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #3718:
URL: https://github.com/apache/parquet-java/pull/3718#issuecomment-6134991715

   This pull request has been automatically marked as stale because it has had no activity for at least 2 months. If you are still working on this change or plan to move it forward, please leave a comment or push a new commit so we know to keep it open. Otherwise, this PR will be closed automatically in about one month. Thank you for your contribution to Apache Parquet!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@parquet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@parquet.apache.org
For additional commands, e-mail: issues-help@parquet.apache.org