| 4010 | } |
| 4011 | |
| 4012 | func (p *samplingPredicate) KeepPage(page parquet.Page) bool { |
| 4013 | if p.inner != nil && !p.inner.KeepPage(page) { |
| 4014 | return false |
| 4015 | } |
| 4016 | |
| 4017 | // We call Expect() on page because it is closer to the actual data |
| 4018 | // to be processed. We could call it earlier in KeepColumnChunk() |
| 4019 | // but it reduces effectiveness of the sampler because we may |
| 4020 | // skip around or exit early due to any other conditions. |
| 4021 | p.sampler.Expect(uint64(page.NumValues())) |
| 4022 | return true |
| 4023 | } |
| 4024 | |
| 4025 | func (p *samplingPredicate) KeepValue(value parquet.Value) bool { |
| 4026 | if p.inner != nil && !p.inner.KeepValue(value) { |