Commit 78b9eac
feat(pruning): add StatisticsSource trait with two-phase resolve/evaluate API
Introduces a new expression-based statistics API for pruning that
separates async data resolution from sync predicate evaluation.
- StatisticsSource trait: accepts &[Expr], returns Vec<Option<ArrayRef>>
- ResolvedStatistics: HashMap<Expr, ArrayRef> cache for pre-resolved stats
- PruningPredicate::evaluate(): sync evaluation against pre-resolved cache
- PruningPredicate::all_required_expressions(): exposes needed Expr list
- Blanket impl bridges existing PruningStatistics implementations
- prune() refactored to delegate through resolve_all_sync + evaluate
This enables async statistics sources (external metastores, runtime
sampling) while keeping the evaluation path synchronous for use in
Stream::poll_next() contexts like EarlyStoppingStream.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent fb12029 commit 78b9eac
5 files changed
Lines changed: 817 additions & 30 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
20 | 21 | | |
21 | 22 | | |
| 23 | + | |
22 | 24 | | |
| 25 | + | |
| 26 | + | |
23 | 27 | | |
24 | 28 | | |
25 | 29 | | |
| |||
30 | 34 | | |
31 | 35 | | |
32 | 36 | | |
| 37 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| 29 | + | |
0 commit comments