thisisnic commented on issue #43274:
URL: https://github.com/apache/arrow/issues/43274#issuecomment-7185797364

   Thanks for reporting this! I'm going through older bug issues to see if we 
can close them out.
   
   This is working as documented. `ParquetFileFragment.subset(filter)` selects 
whole row groups using the Parquet row group statistics; it does not filter 
rows. If a row group holds a mix of matching and non-matching values, the whole 
row group is kept, so `'d'` still appears. To filter rows, pass the filter when 
reading:
   
   ```python
   for batch in fragment.to_batches(filter=filter):
       ...
   ```
   
   Checked on 26.0.1: with `a`, `b`, `c`, `d` mixed in one row group, 
`subset(filter)` keeps that row group and returns all four values, while 
`to_batches(filter=filter)` and `dataset.read()` return only `a`, `b`, `c`. 
Note also that the `filters` given to `pq.ParquetDataset` apply to 
`dataset.read()`, not to the fragments in `dataset.fragments`.
   
   Closing as not a bug.
   


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