| 3900 | } |
| 3901 | |
| 3902 | func (p *samplingPredicate) KeepPage(page parquet.Page) bool { |
| 3903 | if p.inner != nil && !p.inner.KeepPage(page) { |
| 3904 | return false |
| 3905 | } |
| 3906 | |
| 3907 | // We call Expect() on page because it is closer to the actual data |
| 3908 | // to be processed. We could call it earlier in KeepColumnChunk() |
| 3909 | // but it reduces effectiveness of the sampler because we may |
| 3910 | // skip around or exit early due to any other conditions. |
| 3911 | p.sampler.Expect(uint64(page.NumValues())) |
| 3912 | return true |
| 3913 | } |
| 3914 | |
| 3915 | func (p *samplingPredicate) KeepValue(value parquet.Value) bool { |
| 3916 | if p.inner != nil && !p.inner.KeepValue(value) { |