jhorstmann opened a new pull request, #12003:
URL: https://github.com/apache/arrow-rs/pull/12003

   > [!IMPORTANT]
   >
   > Before opening this PR, [enable CI in your 
fork](https://github.com/apache/arrow-rs/blob/main/CONTRIBUTING.md#pull-requests-from-forks).
   >
   > **Delete this notice after enabling CI.**
   
   # Which issue does this PR close?
   
   <!--
   It is not necessary to raise an issue, but it is encouraged if it is a 
non-trivial
   enhancement/bug.
   
   If this PR relates to an existing issue, but does not fully resolve it, 
please change
   the wording below from "Closes #NNN" to "Relates to #NNN" or "Part of #NNN" 
to avoid
   false closing an issue.
   -->
   
   - Closes #7356
   
   # Rationale for this change
   
   I ran into this issue again, where an empty parquet file had a non-zero 
`total_uncompressed_size` and `total_compressed_size`, leading to my code 
trying to parse a data page at offset 0 and stumbling over that "PAR1" magic.
   
   <!--
   Why are you proposing this change? If this is already explained clearly in 
the
   issue then this section is not needed. Explaining clearly why changes are 
proposed
   helps reviewers understand your changes and offer better suggestions for 
fixes.
   
   Please try to explain the problem you are trying to solve in terms of the 
user-visible
   behavior, rather than the implementation.
   -->
   
   # What changes are included in this PR?
   
   Empty row groups no longer write a dictionary page, and their size is 0.
   
   This also skips the encodings, if no actual data using that encoding is 
written.
   
   # Are these changes tested?
   
   One new unit test specifically for the empty file, other tests still pass.
   
   # Are there any significant user-facing changes?
   
   The changes to the encodings metadata could be unexpected, it would be fine 
to leave these out if wanted.


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to