romainfrancois commented on pull request #8122:
URL: https://github.com/apache/arrow/pull/8122#issuecomment-697227723


   I added some tests for `ReadRowGroup(s)()` and clarified about 0-based. 
   
   I'm getting a weird error in some cases with `ReadRowGroups()`: 
   
   ``` r
   library(arrow, warn.conflicts = FALSE)
   
   tab <- Table$create(x = 1:100)
   tf <- tempfile()
   write_parquet(tab, tf, chunk_size = 10)
   
   reader <- ParquetFileReader$create(tf)
   # sensible error
   reader$ReadRowGroups(-2)
   #> Error in parquet___arrow___FileReader__ReadRowGroups1(self, row_groups): 
Invalid: Some index in row_group_indices is -2, which is either < 0 or >= 
num_row_groups(10)
   #> In 
/Users/romainfrancois/git/apache/arrow/cpp/src/parquet/arrow/reader.cc, line 
842, code: BoundsCheck(row_groups, column_indices)
   
   # weird error
   reader$ReadRowGroups(c(0, -2))
   #> Error in parquet___arrow___FileReader__ReadRowGroups1(self, row_groups): 
IOError: The file only has 0 columns, requested metadata for column: 0
   #> In 
/Users/romainfrancois/git/apache/arrow/cpp/src/parquet/arrow/reader.cc, line 
873, code: final_status
   ```
   
   <sup>Created on 2020-09-23 by the [reprex 
package](https://reprex.tidyverse.org) (v0.3.0.9001)</sup>


----------------------------------------------------------------
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.

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


Reply via email to