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

   # Which issue does this PR close?
   
   <!--
   We generally require a GitHub issue to be filed for all bug fixes and 
enhancements and this helps us generate change logs for our releases. You can 
link an issue to this PR using the GitHub syntax. For example `Closes #123` 
indicates that this PR will close issue #123.
   -->
   
   Closes #2543 
   
   # Rationale for this change
    
   <!--
   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.
   -->
   
   Discovered some small bugs while testing the page pruning logic in 
`ParquetRecordBatchStream`. We were improperly reading data pages when not 
necessary in a few cases. When we have only fetched the pages required for a 
given row selection this causes an error. 
   
   # What changes are included in this PR?
   
   <!--
   There is no need to duplicate the description in the issue here but it is 
sometimes worth providing a summary of the individual changes in this PR.
   -->
   
   We had a method `GenericColumnReader::has_next` which will check if the 
current page is fully decoded and then load the next page (if it exists). This 
method was used in a few places to test whether the column was exhausted. This 
can cause issues since it will load the next page, which may be skipped 
according to the current row selection. 
   
   Added a method `GenericColumnReader::has_next` which will test whether the 
column is exhausted without loading the next page and changed a few places to 
use that. 
   
   I think a slightly more thorough refactor is not a bad idea since the API is 
a bit confusing as is, but this should solve the immediate bugs. 
   
   # Are there any user-facing changes?
   
   <!--
   If there are user-facing changes then we may require documentation to be 
updated before approving the PR.
   -->
   
   No
   
   <!---
   If there are any breaking changes to public APIs, please add the `breaking 
change` label.
   -->
   


-- 
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: github-unsubscr...@arrow.apache.org

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

Reply via email to