Skip to content

feat: prune Parquet scans with struct field statistics - #27736

Open
adriangb wants to merge 5 commits into
apache:mainfrom
adriangb:expr-stats-pruning
Open

adriangb wants to merge 5 commits into
apache:mainfrom
adriangb:expr-stats-pruning

Conversation

@adriangb

@adriangb adriangb commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

Rationale for this change

Parquet stores min/max values, null counts, a page index and a bloom filter for every struct field leaf. DataFusion ignores all of them for s['a'], because PruningPredicate only knows top-level columns.

Example

A file with 4 row groups of 3 rows each, s: {a: int, b: int}:

Row group s['a']
0 1..3
1 10..12
2 NULL struct, 20, NULL field
3 30..32
EXPLAIN ANALYZE SELECT * FROM t WHERE s['a'] > 15;
- pruning_predicate=<none>
- row_groups_pruned_statistics=4 total → 4 matched
+ pruning_predicate=get_field(s@0, a)_null_count@1 != row_count@2 AND get_field(s@0, a)_max@0 > 15
+ row_groups_pruned_statistics=4 total → 2 matched

The same thing, for other access paths:

Query main This PR
s['a'] > 15 (row groups) 4 → 4 4 → 2, and 1 of the 2 is fully matched
s['a'] >= 85 (pages) 0 pages pruned 10 → 2 pages
s['a'] < 10 over 2 files 2 → 2 row groups 2 → 1, and that 1 is fully matched
ORDER BY s['a'] DESC LIMIT 3 (TopK dynamic filter) 0 row groups pruned 4 of 5 pruned
s['a'] = 50 with bloom filters 2 → 2 2 → 0
hash join on s['a'] 10 → 10 10 → 3

What changes are included in this PR?

Summary

  • What: s['a'] > 5 prunes Parquet row groups, pages and bloom filters with the statistics of the leaf column s.a.
  • How: a pruning predicate reads statistics by a typed target. The default target is a column, so existing statistics sources compile and behave as before.
  • Size: +2,335/−750 in 18 files, in five commits. About 500 of the added lines are one new file with its tests.
  • Where to look: commits 2 and 3 (datafusion/pruning) hold the design. Commit 4 applies it to Parquet. Commit 5 is the only one that changes query results.
  • Public API: one break, RequiredColumns::columns() becomes targets(). One deprecation, PagePruningAccessPlanFilter::new.

A pruning predicate reads statistics by a typed target. A resolver gives each expression its target when the predicate is built. The predicate stores the target and hands it back to the statistics source when it prunes.

// datafusion-pruning
pub trait StatisticsResolver {
    type Target: Clone + Debug;
    /// `Some` if `expr` has statistics. The target names them.
    fn resolve(&self, expr: &Arc<dyn PhysicalExpr>) -> Option<Self::Target>;
}

/// `PruningStatistics`, for a target type. Every `PruningStatistics`
/// implements `PruningStatisticsSource<Column>`.
pub trait PruningStatisticsSource<T = Column> {
    fn min_values(&self, target: &T) -> Option<ArrayRef>;
    // max_values, null_counts, row_counts, num_containers, contained
}

pub struct PruningPredicate<T = Column> { .. }

PruningPredicateBuilder::new()
    .with_file_schema(schema)
    .with_resolver(resolver)      // default: ColumnResolver
    .try_build(expr)              // PruningPredicate<R::Target>

"Can the predicate use this expression" and "which statistics does it read" are one call. No code looks an expression up a second time when it prunes.

For one Parquet file:

sequenceDiagram
    participant O as Parquet opener
    participant R as ParquetStatisticsResolver
    participant P as PruningPredicate
    participant S as RowGroupPruningStatistics
    O->>R: new(file schemas)
    O->>P: build(predicate, resolver = R)
    P->>R: resolve(s['a'])
    R-->>P: target: leaf of s.a
    Note over P: s['a'] > 15 becomes s['a']_max > 15
    O->>P: prune(S)
    P->>S: max_values(target)
    S-->>P: max of that leaf, one per row group
Loading

In the Parquet crate, all of this is crate-private:

Item Role
ParquetStatisticsTarget Leaf column index and Arrow field. Owned, so the predicate borrows nothing
ParquetStatisticsResolver Resolves a column or a get_field chain to a leaf of one file. The only code that inspects GetFieldFunc
ArrowStatisticsResolver Same decision without a file, for the predicate that EXPLAIN prints
Row group statistics, bloom filters, page index Each implements PruningStatisticsSource<ParquetStatisticsTarget>

A predicate with leaf targets belongs to one file. The public methods that take a plain PruningPredicate (RowGroupAccessPlanFilter::prune_by_statistics and prune_by_statistics_with_metadata) build it again for the file. PagePruningAccessPlanFilter::new has no Parquet schema, so it is deprecated in favor of new_with_parquet_schema.

Final state of the column and target APIs

This PR adds target forms next to several column forms. The plan is one form per concept. This PR deprecates only what it makes wrong. The other deprecations are follow-up work.

Item In this PR Final state
LiteralGuarantee, LiteralGuarantee::analyze Wrapper over ExprLiteralGuarantee. The doc comment states the plan Deprecate, then remove
PruningPredicate::literal_guarantees() Column copy of target_literal_guarantees(), built on first use Deprecate, then remove
ExprLiteralGuarantee<T>, target_literal_guarantees() New Keep as the only form
PruningStatistics A blanket impl makes it a PruningStatisticsSource<Column> Deprecate after a long notice period. The migration is a change of the trait name, because the method signatures are equal
PruningStatisticsSource<T> New Keep as the only trait
ColumnResolver, the T = Column defaults Defaults Keep. They make the column case need no extra code
RequiredColumns::single_column() Deprecated on main Remove
PagePruningAccessPlanFilter::new Deprecated here Remove, together with the predicates that the filter builds again for each file

Open questions:

  • The names ExprLiteralGuarantee and target_literal_guarantees carry prefixes that only make sense while the column forms exist. A rename after a release is a second break.
  • RowGroupAccessPlanFilter::prune_by_statistics takes a column PruningPredicate and builds it again for the file. A constructor that takes the expression and both schemas can replace it, as for PagePruningAccessPlanFilter.

How to review

Review commit by commit. Each commit builds and passes its tests.

# Commit Crate Size Behavior change
1 feat: ExprLiteralGuarantee<T> physical-expr +218/−90 None for columns
2 refactor: the rewrite identifies each statistic by an expression and a Column target. No generics, no public API change pruning +306/−199 None
3 feat: the target becomes a type parameter. Adds StatisticsResolver and PruningStatisticsSource<T>. Replaces RequiredColumns::columns() with targets() pruning +791/−144 None with the default resolver
4 refactor: Parquet statistics sources read leaf targets. The resolvers accept columns only datasource-parquet +889/−324 None: the slt tests on main pass unchanged
5 feat: resolve get_field to a leaf datasource-parquet +198/−60 The slt diff shows it
  • Commit 2 holds the logic change of the rewrite. Commit 3 is then mostly type parameters in pruning_predicate.rs, plus the new file statistics_source.rs (505 lines, half of them tests).
  • Commits 1 to 3 are the new API. Commits 4 and 5 make Parquet use it.
  • Commit 4 builds on the PagePruner steps from #27975.

What is the testing strategy for this PR?

  • parquet_struct_field_pruning.slt: every case in the table above, plus null structs, type drift and !=. main holds the output without pruning (test: add struct field pruning tests #27876), and commit 5 shows the change.
  • A missing null count: a column and a struct field read their statistics through one converter in row_group_filter.rs, so the existing test row_group_pruning_predicate_missing_null_count covers both.
  • Unit tests for the resolvers in statistics_expr.rs, for typed targets in statistics_source.rs, and for the public row group method with a struct field predicate.
  • The existing pruning and Parquet tests pass without changes to their expectations.

Benchmarks

Run on the benchmark runner against the merge base 915c5b608. The tree is the one of this head. No benchmark has a predicate on a struct field, so these runs measure the cost for existing queries.

Benchmark Total, base Total, this PR Change Queries slower / faster / same
tpch 717.55 ms 713.31 ms −0.6% 0 / 0 / 22
clickbench_partitioned 18,990.90 ms 19,128.66 ms +0.7% 3 / 0 / 40
clickbench_pushdown 15,926.09 ms 16,020.96 ms +0.6% 0 / 0 / 43

The three slower clickbench_partitioned queries are Q34, Q36 and Q39, at 1.06x to 1.07x.

Not in this PR

Are there any user-facing changes?

Change Breaking?
PruningPredicate, RequiredColumns and PruningPredicateBuilder get a type parameter with a default Source compatible, except where the compiler inferred the type from nothing else
New PruningStatisticsSource trait with the method names of PruningStatistics Code that imports both traits must name the trait in a call
PagePruningAccessPlanFilter::new is deprecated No
RequiredColumns::targets() replaces columns(), which #27894 added No: no release contains columns()
EXPLAIN shows a pruning_predicate for get_field filters, and scans prune on them Plan output and metrics
New StatisticsResolver, ColumnResolver, ExprLiteralGuarantee No

The upgrade guide has one entry, for the first two rows. The deprecation message names the replacement, so it has no entry.

🤖 Generated with Claude Code

@github-actions github-actions Bot added physical-expr Changes to the physical-expr crates core Core DataFusion crate sqllogictest SQL Logic Tests (.slt) catalog Related to the catalog crate common Related to common crate datasource Changes to the datasource crate labels Nov 25, 2026
@adriangb
adriangb force-pushed the expr-stats-pruning branch 3 times, most recently from 4793006 to 68509e0 Compare November 26, 2026 19:44
@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Nov 26, 2026
/// Only struct paths are supported. A path through a map is a runtime key
/// lookup, and a field below a list has statistics per element, not per row.
#[derive(Debug, Default)]
pub(crate) struct GetFieldStatisticsResolver;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fake Variant resolver has to match its function by name and restate which leaves it reads. With #26282, a single built-in resolver could cover any function with the NestedInputAccess capability: bind gets the leaves from required_fields (which is called with each file's physical schema, so per-file shredding works), and statistics calls output_statistics. get_field would go through the same path with no GetFieldFunc downcast, and a function author would get pruning and narrowed reads from one implementation. The resolver trait would stay for the format-specific cases, like binding a cast to a sidecar leaf. It feels like this PR and #26282 fit together well: this one gives output_statistics a general place to be called from, and that one would no longer need its placeholder-column rewrite.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not convinced there can be an implementaiton that is shared by struct field access and variant. Variant has all of the quirks of needing stats to determine if the shredded field can be trusted, etc. But if there can be then I agree something like #26282 could be used to implement it with this PR as the API that backs it.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I spent some time with #26282 to understand where they fit.

I like the split for get_field on a plain struct. The function says which struct paths it reads, the scan maps those paths to Parquet leaves, and nothing in Parquet needs to downcast GetFieldFunc.

Where I get stuck is Variant. Shredding only exists in each file's physical schema. At planning time variant_get sees an unshredded Variant, so the useful answer from required_fields only comes from the per-file call. That means ScalarUDFImpl answers a question about one file's storage layout, and if the schema adapter unshreds before execution, the function never runs on the layout it described. It feels like that knowledge belongs at the format/encoding layer rather than on the function.

So maybe the scope is:

  • NestedInputAccess (or something like it) for paths that exist at the logical level, like struct fields. A built-in resolver here would handle every function with the capability, so get_field loses its special case.
  • The resolver trait for layouts that only exist per file: shredded Variant, sidecar leaves, anything that needs bloom filters or per-page data.

That would also let #26282 drop the placeholder-column rewrite, since bind/StatsExpr gives it a place to plug in.

But at that point we are creating a trait that as far as I can tell only helps get_field i.e. a trait with a single user.

Does that match how you see it, or am I missing a case where the per-file required_fields is the better home for shredding?

/// The built-in resolver for struct fields is always present.
///
/// [`ParquetStatisticsResolver`]: crate::statistics_resolver::ParquetStatisticsResolver
pub fn with_statistics_resolver(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This only reaches scans where the caller builds the ParquetSource by hand. Is there a route for ListingTable or CREATE EXTERNAL TABLE, where the user registers a UDF but never sees the source?

@adriangb adriangb Nov 27, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can add that API later and wire it just like the other similar options.

&self,
expr: &Arc<dyn PhysicalExpr>,
) -> Option<Arc<dyn BoundExprStatistics>> {
if let Some(bound) = self.lock_bindings().get(expr) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

matches is called for every non-column node the rewrite visits, and bind starts with a HashMap lookup keyed by the expression, which hashes that node's whole subtree under the mutex. Once one key is bound the map is non-empty, so a long OR chain or a large dynamic filter hashes quadratically, per file, and again each time a dynamic filter updates. Could the resolvers get a cheap reject before the lookup?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed the quadratic behavior is not ideal. I will look into what we can do.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for catching this. You were right: the per-file cache hashed the whole subtree at every node, so a deep predicate cost O(n²) or worse.

I changed the design in 65d4b9c so that the cache is gone. StatisticsExprMatcher::bind returns the resolver's binding, and the binding travels in the statistics key (StatsExpr). The statistics lookup reads the binding directly and does not look the expression up again. This removes the HashMap keyed by PhysicalExpr.

Timings for one file's predicate build, with a left-deep OR of s['a'] = i (release build):

Terms Before After
250 199 ms 50 ms
500 1.02 s 95 ms
1,000 7.26 s 191 ms
2,000 54.3 s 382 ms

The build time is now linear in the number of terms.

@alamb

alamb commented Nov 29, 2026

Copy link
Copy Markdown
Contributor

I am a little lost given the size of this PR and I didn't read the whole thing so I apologize if this is a silly question. If we had something like NestedInputAccess like in #26282 from @cetra3 would we need this PR?

In my mind NestedInputAccess basically provides a way to convert expr(struct_column) --> col_reference_of_the_leaf in a generic way

If that is insufficient (which may be the case for Variant as we need access to a few of the leaf field, I think) it seems like a more extendable way to support predicate pruning would be to add some method to PhysicalExpr trait to allow a expr to provide the min / maxes and remove all the hard coded use of Column in the Pruning code

@adriangb adriangb changed the title feat: expression-keyed statistics pruning (struct fields, pluggable resolvers) feat: prune Parquet scans with struct field statistics Nov 30, 2026
Comment on lines +1637 to +1638
/// A column of the file schema, by name.
Column(String),

@adriangb adriangb Nov 30, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't we always just address bloom filters by leaf index? Column is just the special case where the leaf = root.

#[derive(Clone)]
pub struct StatsExpr {
expr: Arc<dyn PhysicalExpr>,
binding: Arc<dyn Any + Send + Sync>,

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This type erasure is a bit ugly

Some((BloomFilterKey::Column(name), leaf))
});
let exprs = predicate.literal_exprs().into_iter().filter_map(|expr| {
let leaf = struct_field_leaf(&expr)?.leaf;

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to be adding more special casing of struct field access

column_sbbf: HashMap<String, ColumnBloomFilter>,
/// Bloom filters for expressions with their own statistics (such as
/// struct fields), by the leaf that the expression is bound to.
expr_sbbf: Vec<(usize, ColumnBloomFilter)>,

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feels like something went wrong if we need column_sbbf AND expr_sbbf.

Comment on lines +1081 to +1086
columns: Vec<(phys_expr::Column, StatisticsType, Field)>,
/// The expression of each entry in `columns`, at the same index, when
/// the statistics are for an expression with its own statistics (such
/// as `get_field(s, 'a')`) rather than for the column itself. The
/// column in `columns` is then the one column the expression reads.
stats_exprs: Vec<Option<StatsExpr>>,

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need this split? Should RequiredColumns be refactored into something expression based? I.e. should this bemore like:

struct RequiredExprStatistics {
    Vec<RequiredExprStatistic>,
}

struct RequiredExprStatistic {
  exp: StatsExpr,
  stats: StatisticsType,
  field: Field,
}

Comment on lines +1103 to +1105
// An expression with its own statistics is not the column itself, so
// callers that read per-column statistics (such as the page index)
// must not treat it as one.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This ain't pretty

adriangb added a commit to adriangb/datafusion that referenced this pull request Dec 2, 2026
## Which issue does this PR close?

Part of apache#20871. It is split
out of apache#27736.

## Rationale for this change

`RequiredColumns::single_column()` has one user: Parquet page pruning.
The check only makes sense for page pruning. The pages of each column
have their own row boundaries, so page pruning can evaluate a predicate
only on the pages of one column. Row group and file pruning have no such
limit.

The check is a few lines of code. So it belongs in the page filter, and
`RequiredColumns` only needs to list what the predicate reads.

apache#27736 lets a predicate read
statistics of things that are not columns. There, "single column" on
`RequiredColumns` has no meaning. That PR also replaces `columns()` with
a typed accessor before the next release, so `columns()` does not become
a long-term API.

## What changes are included in this PR?

One call site in `page_filter.rs`:

```diff
-    let column = predicate.required_columns().single_column()?;
+    let column = single_column(predicate)?;
```

| Item | Where | Change |
| --- | --- | --- |
| `RequiredColumns::columns()` |
`datafusion/pruning/src/pruning_predicate.rs` | New. Yields the column
of each required statistic, in order. |
| `RequiredColumns::single_column()` |
`datafusion/pruning/src/pruning_predicate.rs` | Deprecated. Behavior is
unchanged. |
| `single_column(&PruningPredicate)` |
`datafusion/datasource-parquet/src/page_filter.rs` | New private helper.
Replaces the 4 call sites. |

## What is the testing strategy for this PR?

- `required_columns_lists_each_statistic_column` asserts the exact
column list of `a > 1 AND b < 2`.
- `single_column_requires_one_column` asserts that a predicate on one
column gives `Some(a)` and a predicate on two columns gives `None`.
- The existing page pruning tests, `parquet_integration` and the Parquet
sqllogictests pass unchanged.

## Are there any user-facing changes?

`RequiredColumns::single_column()` is deprecated.
`RequiredColumns::columns()` is new. Behavior does not change.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
@adriangb
adriangb force-pushed the expr-stats-pruning branch 4 times, most recently from 34aea50 to 9b4e704 Compare December 2, 2026 21:06
Rich-T-kid pushed a commit to Rich-T-kid/datafusion that referenced this pull request Dec 2, 2026
## Which issue does this PR close?

- Prepares for apache#27736.

## Rationale for this change

Predicates on struct fields such as `s['a'] > 5` do not prune Parquet
row groups or pages today. This PR records that behavior in tests. The
follow-up PR apache#27736 adds the
pruning and updates the expected output. Its diff then shows the effect
of the change directly.

## What changes are included in this PR?

This PR is tests only. It does not change any behavior.

- `datafusion/sqllogictest/test_files/parquet_struct_field_pruning.slt`
writes Parquet files with struct columns. It records the `EXPLAIN
ANALYZE` row group and page pruning metrics for predicates on struct
fields.

## What is the testing strategy for this PR?

The PR consists of the new tests. They pass on `main` and record its
current behavior.

## Are there any user-facing changes?

No.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
Rich-T-kid pushed a commit to Rich-T-kid/datafusion that referenced this pull request Dec 2, 2026
## Which issue does this PR close?

Part of apache#20871. It is split
out of apache#27736.

## Rationale for this change

`RequiredColumns::single_column()` has one user: Parquet page pruning.
The check only makes sense for page pruning. The pages of each column
have their own row boundaries, so page pruning can evaluate a predicate
only on the pages of one column. Row group and file pruning have no such
limit.

The check is a few lines of code. So it belongs in the page filter, and
`RequiredColumns` only needs to list what the predicate reads.

apache#27736 lets a predicate read
statistics of things that are not columns. There, "single column" on
`RequiredColumns` has no meaning. That PR also replaces `columns()` with
a typed accessor before the next release, so `columns()` does not become
a long-term API.

## What changes are included in this PR?

One call site in `page_filter.rs`:

```diff
-    let column = predicate.required_columns().single_column()?;
+    let column = single_column(predicate)?;
```

| Item | Where | Change |
| --- | --- | --- |
| `RequiredColumns::columns()` |
`datafusion/pruning/src/pruning_predicate.rs` | New. Yields the column
of each required statistic, in order. |
| `RequiredColumns::single_column()` |
`datafusion/pruning/src/pruning_predicate.rs` | Deprecated. Behavior is
unchanged. |
| `single_column(&PruningPredicate)` |
`datafusion/datasource-parquet/src/page_filter.rs` | New private helper.
Replaces the 4 call sites. |

## What is the testing strategy for this PR?

- `required_columns_lists_each_statistic_column` asserts the exact
column list of `a > 1 AND b < 2`.
- `single_column_requires_one_column` asserts that a predicate on one
column gives `Some(a)` and a predicate on two columns gives `None`.
- The existing page pruning tests, `parquet_integration` and the Parquet
sqllogictests pass unchanged.

## Are there any user-facing changes?

`RequiredColumns::single_column()` is deprecated.
`RequiredColumns::columns()` is new. Behavior does not change.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
@adriangb
adriangb marked this pull request as ready for review December 2, 2026 21:15
@alamb

alamb commented Dec 3, 2026

Copy link
Copy Markdown
Contributor

I will try and read this tomorrow

adriangb added a commit to adriangb/datafusion that referenced this pull request Dec 4, 2026
## Which issue does this PR close?

- Part of apache#20871. It is split
out of apache#27736, which changes
this code to read statistics of struct fields. This PR does not depend
on that one and is useful without it.

## Rationale for this change

`PagePruningAccessPlanFilter::prune_plan_with_page_index_and_metrics` is
one function of about 250 lines with 11 mutable locals. It mixes four
things:

```text
prune_plan_with_page_index_and_metrics          about 250 lines
  guards (3 early returns)
  build inverse predicates                      only for LIMIT
  for each row group
    skip if fully matched
    for each predicate          -> selection, matched pages
    apply selection to the access plan, count rows
    for each inverse predicate  -> fully matched rows, only for LIMIT
    count pages
  write 4 metrics
  apply the LIMIT plan
```

The LIMIT path is the hardest part to follow, and it sits in the middle
of ordinary pruning. The same four references to the file
(`arrow_schema`, `parquet_schema`, `parquet_metadata`, `file_metrics`)
go to every helper.

## What changes are included in this PR?

`PagePruner` holds the file and the counts of one pass. Each step is one
method:

```text
prune_plan_with_page_index_and_metrics          about 100 lines
  guards
  inverted_predicates()                         only for LIMIT
  for each row group
    skip if fully matched
    pruner.prune_row_group()
    pruner.apply_selection()
    pruner.fully_matched_selection()            only for LIMIT
  pruner.counts.add_to(metrics)
  apply the LIMIT plan
```

| New item | Replaces |
|---|---|
| `PagePruner::prune_row_group` | The loop over the predicates, and the
page counters |
| `PagePruner::apply_selection` | The update of the access plan, and the
row counters |
| `PagePruner::fully_matched_selection` | The loop over the inverse
predicates, with its `complete` flag |
| `PagePruner::prune_pages_for_predicate` | The free function of the
same name with six arguments |
| `PagePruner::page_count` | `fully_matched_page_count`, and an inline
copy of the same expression |
| `PagePruner::has_complete_page_index` | The inline check and its debug
message |
| `PagePruningCounts` | Four `let mut total_*` and the four metric
writes |
| `PagePruningAccessPlanFilter::inverted_predicates` | The inline
closure |

No behavior changes. The points that could change it, and that I checked
against the old code:

- The order of the early returns.
- When the row and page counts are updated. Page counts are still added
once per row group that is not fully matched.
- The number of predicate evaluations on the LIMIT path. The test
`inverse_pruning_short_circuits` counts them.
- A row group whose inverse predicates give an empty selection is still
recorded as an empty selection, and not as "unknown".

## What is the testing strategy for this PR?

No new tests: this is a refactor, and the existing tests cover the code.
They pass without changes:

- The unit tests of `datafusion-datasource-parquet` (318), including the
page filter tests for LIMIT pruning.
- The Parquet integration tests in `datafusion/core/tests/parquet`
(265), which assert the page index metrics.
- The Parquet and LIMIT pruning sqllogictests.

I did not run benchmarks. The code runs the same steps in the same
order, and it keeps the two page sets that the old code reuses across
row groups.

## Are there any user-facing changes?

No. Every new item is private.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
LiteralGuarantee::analyze finds guarantees for columns only. Pruning on
the statistics of other expressions, such as a struct field, needs the
same analysis for those expressions.

Add ExprLiteralGuarantee<T>. Its analyze function takes a function that
returns a target of type T for each expression that can have a
guarantee, and each guarantee keeps its target. The caller decides once
whether an expression is usable and what names its statistics.

LiteralGuarantee::analyze is this analysis for columns. Its results do
not change.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@adriangb

adriangb commented Dec 4, 2026

Copy link
Copy Markdown
Contributor Author

run benchmark tpch clickbench_partitioned clickbench_pushdown

@adriangbot

Copy link
Copy Markdown

🤖 Benchmark running (GKE) | trigger
Instance: c4a-highmem-16 (12 vCPU / 65 GiB) | Linux bench-c7426819759-6243-dgt9w 6.12.105+ #1 SMP Sat Sep 19 07:55:25 UTC 2026 aarch64 GNU/Linux

CPU Details (lscpu)
Architecture:                            aarch64
CPU op-mode(s):                          64-bit
Byte Order:                              Little Endian
CPU(s):                                  16
On-line CPU(s) list:                     0-15
Vendor ID:                               ARM
Model name:                              Neoverse-V2
Model:                                   1
Thread(s) per core:                      1
Core(s) per cluster:                     16
Socket(s):                               -
Cluster(s):                              1
Stepping:                                r0p1
BogoMIPS:                                2000.00
Flags:                                   fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh rng bti
L1d cache:                               1 MiB (16 instances)
L1i cache:                               1 MiB (16 instances)
L2 cache:                                32 MiB (16 instances)
L3 cache:                                80 MiB (1 instance)
NUMA node(s):                            1
NUMA node0 CPU(s):                       0-15
Vulnerability Gather data sampling:      Not affected
Vulnerability Indirect target selection: Not affected
Vulnerability Itlb multihit:             Not affected
Vulnerability L1tf:                      Not affected
Vulnerability Mds:                       Not affected
Vulnerability Meltdown:                  Not affected
Vulnerability Mmio stale data:           Not affected
Vulnerability Reg file data sampling:    Not affected
Vulnerability Retbleed:                  Not affected
Vulnerability Spec rstack overflow:      Not affected
Vulnerability Spec store bypass:         Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1:                Mitigation; __user pointer sanitization
Vulnerability Spectre v2:                Mitigation; CSV2, BHB
Vulnerability Srbds:                     Not affected
Vulnerability Tsa:                       Not affected
Vulnerability Tsx async abort:           Not affected
Vulnerability Vmscape:                   Not affected

Comparing expr-stats-pruning (b8122c6) to 915c5b6 (merge-base) diff

Run configuration
run benchmark clickbench_partitioned
Trigger comment
run benchmark tpch clickbench_partitioned clickbench_pushdown

Results will be posted here when complete


File an issue against this benchmark runner

@adriangbot

Copy link
Copy Markdown

🤖 Benchmark running (GKE) | trigger
Instance: c4a-highmem-16 (12 vCPU / 65 GiB) | Linux bench-c7426819759-6242-z2hc4 6.12.105+ #1 SMP Sat Sep 19 07:55:25 UTC 2026 aarch64 GNU/Linux

CPU Details (lscpu)
Architecture:                            aarch64
CPU op-mode(s):                          64-bit
Byte Order:                              Little Endian
CPU(s):                                  16
On-line CPU(s) list:                     0-15
Vendor ID:                               ARM
Model name:                              Neoverse-V2
Model:                                   1
Thread(s) per core:                      1
Core(s) per cluster:                     16
Socket(s):                               -
Cluster(s):                              1
Stepping:                                r0p1
BogoMIPS:                                2000.00
Flags:                                   fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh rng bti
L1d cache:                               1 MiB (16 instances)
L1i cache:                               1 MiB (16 instances)
L2 cache:                                32 MiB (16 instances)
L3 cache:                                80 MiB (1 instance)
NUMA node(s):                            1
NUMA node0 CPU(s):                       0-15
Vulnerability Gather data sampling:      Not affected
Vulnerability Indirect target selection: Not affected
Vulnerability Itlb multihit:             Not affected
Vulnerability L1tf:                      Not affected
Vulnerability Mds:                       Not affected
Vulnerability Meltdown:                  Not affected
Vulnerability Mmio stale data:           Not affected
Vulnerability Reg file data sampling:    Not affected
Vulnerability Retbleed:                  Not affected
Vulnerability Spec rstack overflow:      Not affected
Vulnerability Spec store bypass:         Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1:                Mitigation; __user pointer sanitization
Vulnerability Spectre v2:                Mitigation; CSV2, BHB
Vulnerability Srbds:                     Not affected
Vulnerability Tsa:                       Not affected
Vulnerability Tsx async abort:           Not affected
Vulnerability Vmscape:                   Not affected

Comparing expr-stats-pruning (b8122c6) to 915c5b6 (merge-base) diff

Run configuration
run benchmark tpch
Trigger comment
run benchmark tpch clickbench_partitioned clickbench_pushdown

Results will be posted here when complete


File an issue against this benchmark runner

@adriangbot

Copy link
Copy Markdown

🤖 Benchmark running (GKE) | trigger
Instance: c4a-highmem-16 (12 vCPU / 65 GiB) | Linux bench-c7426819759-6244-d6dtw 6.12.105+ #1 SMP Sat Sep 19 07:55:25 UTC 2026 aarch64 GNU/Linux

CPU Details (lscpu)
Architecture:                            aarch64
CPU op-mode(s):                          64-bit
Byte Order:                              Little Endian
CPU(s):                                  16
On-line CPU(s) list:                     0-15
Vendor ID:                               ARM
Model name:                              Neoverse-V2
Model:                                   1
Thread(s) per core:                      1
Core(s) per cluster:                     16
Socket(s):                               -
Cluster(s):                              1
Stepping:                                r0p1
BogoMIPS:                                2000.00
Flags:                                   fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh rng bti
L1d cache:                               1 MiB (16 instances)
L1i cache:                               1 MiB (16 instances)
L2 cache:                                32 MiB (16 instances)
L3 cache:                                80 MiB (1 instance)
NUMA node(s):                            1
NUMA node0 CPU(s):                       0-15
Vulnerability Gather data sampling:      Not affected
Vulnerability Indirect target selection: Not affected
Vulnerability Itlb multihit:             Not affected
Vulnerability L1tf:                      Not affected
Vulnerability Mds:                       Not affected
Vulnerability Meltdown:                  Not affected
Vulnerability Mmio stale data:           Not affected
Vulnerability Reg file data sampling:    Not affected
Vulnerability Retbleed:                  Not affected
Vulnerability Spec rstack overflow:      Not affected
Vulnerability Spec store bypass:         Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1:                Mitigation; __user pointer sanitization
Vulnerability Spectre v2:                Mitigation; CSV2, BHB
Vulnerability Srbds:                     Not affected
Vulnerability Tsa:                       Not affected
Vulnerability Tsx async abort:           Not affected
Vulnerability Vmscape:                   Not affected

Comparing expr-stats-pruning (b8122c6) to 915c5b6 (merge-base) diff

Run configuration
run benchmark clickbench_pushdown
Trigger comment
run benchmark tpch clickbench_partitioned clickbench_pushdown

Results will be posted here when complete


File an issue against this benchmark runner

@adriangbot

Copy link
Copy Markdown

🤖 Benchmark completed (GKE) | trigger

Instance: c4a-highmem-16 (12 vCPU / 65 GiB)

Comparing expr-stats-pruning (b8122c6) to 915c5b6 (merge-base) diff

Run configuration
run benchmark tpch
Trigger comment
run benchmark tpch clickbench_partitioned clickbench_pushdown
CPU Details (lscpu)
Architecture:                            aarch64
CPU op-mode(s):                          64-bit
Byte Order:                              Little Endian
CPU(s):                                  16
On-line CPU(s) list:                     0-15
Vendor ID:                               ARM
Model name:                              Neoverse-V2
Model:                                   1
Thread(s) per core:                      1
Core(s) per cluster:                     16
Socket(s):                               -
Cluster(s):                              1
Stepping:                                r0p1
BogoMIPS:                                2000.00
Flags:                                   fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh rng bti
L1d cache:                               1 MiB (16 instances)
L1i cache:                               1 MiB (16 instances)
L2 cache:                                32 MiB (16 instances)
L3 cache:                                80 MiB (1 instance)
NUMA node(s):                            1
NUMA node0 CPU(s):                       0-15
Vulnerability Gather data sampling:      Not affected
Vulnerability Indirect target selection: Not affected
Vulnerability Itlb multihit:             Not affected
Vulnerability L1tf:                      Not affected
Vulnerability Mds:                       Not affected
Vulnerability Meltdown:                  Not affected
Vulnerability Mmio stale data:           Not affected
Vulnerability Reg file data sampling:    Not affected
Vulnerability Retbleed:                  Not affected
Vulnerability Spec rstack overflow:      Not affected
Vulnerability Spec store bypass:         Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1:                Mitigation; __user pointer sanitization
Vulnerability Spectre v2:                Mitigation; CSV2, BHB
Vulnerability Srbds:                     Not affected
Vulnerability Tsa:                       Not affected
Vulnerability Tsx async abort:           Not affected
Vulnerability Vmscape:                   Not affected
Details

Comparing HEAD and expr-stats-pruning
--------------------
Benchmark tpch_sf1.json
--------------------
┏━━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━┓
┃ Query     ┃     HEAD ┃ expr-stats-pruning ┃    Change ┃
┡━━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━┩
│ QQuery 1  │ 38.80 ms │           38.85 ms │ no change │
│ QQuery 2  │ 20.95 ms │           21.09 ms │ no change │
│ QQuery 3  │ 28.61 ms │           28.82 ms │ no change │
│ QQuery 4  │ 17.58 ms │           17.47 ms │ no change │
│ QQuery 5  │ 35.89 ms │           35.66 ms │ no change │
│ QQuery 6  │ 14.23 ms │           14.12 ms │ no change │
│ QQuery 7  │ 42.42 ms │           42.28 ms │ no change │
│ QQuery 8  │ 40.89 ms │           40.59 ms │ no change │
│ QQuery 9  │ 48.38 ms │           49.49 ms │ no change │
│ QQuery 10 │ 41.12 ms │           40.64 ms │ no change │
│ QQuery 11 │ 14.05 ms │           14.00 ms │ no change │
│ QQuery 12 │ 16.53 ms │           16.46 ms │ no change │
│ QQuery 13 │ 42.04 ms │           41.20 ms │ no change │
│ QQuery 14 │ 24.24 ms │           24.19 ms │ no change │
│ QQuery 15 │ 31.46 ms │           31.34 ms │ no change │
│ QQuery 16 │ 13.61 ms │           13.64 ms │ no change │
│ QQuery 17 │ 68.10 ms │           67.49 ms │ no change │
│ QQuery 18 │ 41.70 ms │           41.11 ms │ no change │
│ QQuery 19 │ 32.79 ms │           32.57 ms │ no change │
│ QQuery 20 │ 32.68 ms │           32.25 ms │ no change │
│ QQuery 21 │ 56.85 ms │           56.01 ms │ no change │
│ QQuery 22 │ 14.62 ms │           14.05 ms │ no change │
└───────────┴──────────┴────────────────────┴───────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━┓
┃ Benchmark Summary                 ┃          ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━┩
│ Total Time (HEAD)                 │ 717.55ms │
│ Total Time (expr-stats-pruning)   │ 713.31ms │
│ Average Time (HEAD)               │  32.62ms │
│ Average Time (expr-stats-pruning) │  32.42ms │
│ Queries Faster                    │        0 │
│ Queries Slower                    │        0 │
│ Queries with No Change            │       22 │
│ Queries with Failure              │        0 │
└───────────────────────────────────┴──────────┘

Distribution per query (min / mean ±stddev / max):

Comparing HEAD and expr-stats-pruning
--------------------
Benchmark tpch_sf1.json
--------------------
┏━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┓
┃ Query     ┃                           HEAD ┃             expr-stats-pruning ┃       Change ┃
┡━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━┩
│ QQuery 1  │ 38.80 / 39.79 ±1.41 / 42.58 ms │ 38.85 / 40.29 ±1.53 / 42.49 ms │    no change │
│ QQuery 2  │ 20.95 / 21.62 ±1.02 / 23.64 ms │ 21.09 / 21.45 ±0.42 / 22.25 ms │    no change │
│ QQuery 3  │ 28.61 / 29.06 ±0.45 / 29.91 ms │ 28.82 / 29.60 ±0.87 / 31.23 ms │    no change │
│ QQuery 4  │ 17.58 / 18.48 ±0.76 / 19.75 ms │ 17.47 / 17.66 ±0.33 / 18.32 ms │    no change │
│ QQuery 5  │ 35.89 / 37.42 ±1.65 / 39.84 ms │ 35.66 / 36.36 ±0.65 / 37.59 ms │    no change │
│ QQuery 6  │ 14.23 / 14.53 ±0.39 / 15.29 ms │ 14.12 / 14.35 ±0.21 / 14.72 ms │    no change │
│ QQuery 7  │ 42.42 / 44.33 ±1.60 / 46.86 ms │ 42.28 / 44.93 ±2.59 / 48.11 ms │    no change │
│ QQuery 8  │ 40.89 / 41.45 ±0.73 / 42.81 ms │ 40.59 / 40.92 ±0.31 / 41.35 ms │    no change │
│ QQuery 9  │ 48.38 / 49.56 ±0.95 / 51.13 ms │ 49.49 / 53.68 ±2.58 / 56.10 ms │ 1.08x slower │
│ QQuery 10 │ 41.12 / 41.31 ±0.15 / 41.56 ms │ 40.64 / 41.83 ±1.57 / 44.82 ms │    no change │
│ QQuery 11 │ 14.05 / 14.23 ±0.22 / 14.66 ms │ 14.00 / 14.26 ±0.21 / 14.65 ms │    no change │
│ QQuery 12 │ 16.53 / 16.89 ±0.42 / 17.71 ms │ 16.46 / 16.60 ±0.10 / 16.72 ms │    no change │
│ QQuery 13 │ 42.04 / 44.11 ±3.19 / 50.42 ms │ 41.20 / 43.09 ±1.81 / 45.78 ms │    no change │
│ QQuery 14 │ 24.24 / 24.59 ±0.28 / 24.91 ms │ 24.19 / 24.96 ±1.15 / 27.25 ms │    no change │
│ QQuery 15 │ 31.46 / 32.17 ±0.82 / 33.63 ms │ 31.34 / 32.09 ±0.61 / 32.84 ms │    no change │
│ QQuery 16 │ 13.61 / 13.73 ±0.10 / 13.88 ms │ 13.64 / 13.78 ±0.15 / 14.07 ms │    no change │
│ QQuery 17 │ 68.10 / 69.72 ±1.20 / 71.33 ms │ 67.49 / 69.20 ±1.32 / 71.40 ms │    no change │
│ QQuery 18 │ 41.70 / 42.74 ±1.30 / 45.26 ms │ 41.11 / 42.24 ±1.45 / 44.81 ms │    no change │
│ QQuery 19 │ 32.79 / 33.36 ±0.71 / 34.68 ms │ 32.57 / 34.18 ±2.26 / 38.45 ms │    no change │
│ QQuery 20 │ 32.68 / 32.98 ±0.40 / 33.75 ms │ 32.25 / 32.45 ±0.10 / 32.53 ms │    no change │
│ QQuery 21 │ 56.85 / 57.89 ±0.54 / 58.30 ms │ 56.01 / 57.07 ±0.96 / 58.44 ms │    no change │
│ QQuery 22 │ 14.62 / 14.69 ±0.07 / 14.81 ms │ 14.05 / 14.45 ±0.42 / 15.27 ms │    no change │
└───────────┴────────────────────────────────┴────────────────────────────────┴──────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━┓
┃ Benchmark Summary                 ┃          ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━┩
│ Total Time (HEAD)                 │ 734.64ms │
│ Total Time (expr-stats-pruning)   │ 735.43ms │
│ Average Time (HEAD)               │  33.39ms │
│ Average Time (expr-stats-pruning) │  33.43ms │
│ Queries Faster                    │        0 │
│ Queries Slower                    │        1 │
│ Queries with No Change            │       21 │
│ Queries with Failure              │        0 │
└───────────────────────────────────┴──────────┘

Resource Usage

tpch — base (merge-base)

Metric Value
Wall time 5.0s
Peak memory 1.2 GiB
Avg memory 485.8 MiB
CPU user 19.8s
CPU sys 1.7s
Peak spill 0 B

tpch — branch

Metric Value
Wall time 5.0s
Peak memory 1.1 GiB
Avg memory 478.5 MiB
CPU user 19.8s
CPU sys 1.6s
Peak spill 0 B

File an issue against this benchmark runner

@adriangbot

Copy link
Copy Markdown

🤖 Benchmark completed (GKE) | trigger

Instance: c4a-highmem-16 (12 vCPU / 65 GiB)

Comparing expr-stats-pruning (b8122c6) to 915c5b6 (merge-base) diff

Run configuration
run benchmark clickbench_partitioned
Trigger comment
run benchmark tpch clickbench_partitioned clickbench_pushdown
CPU Details (lscpu)
Architecture:                            aarch64
CPU op-mode(s):                          64-bit
Byte Order:                              Little Endian
CPU(s):                                  16
On-line CPU(s) list:                     0-15
Vendor ID:                               ARM
Model name:                              Neoverse-V2
Model:                                   1
Thread(s) per core:                      1
Core(s) per cluster:                     16
Socket(s):                               -
Cluster(s):                              1
Stepping:                                r0p1
BogoMIPS:                                2000.00
Flags:                                   fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh rng bti
L1d cache:                               1 MiB (16 instances)
L1i cache:                               1 MiB (16 instances)
L2 cache:                                32 MiB (16 instances)
L3 cache:                                80 MiB (1 instance)
NUMA node(s):                            1
NUMA node0 CPU(s):                       0-15
Vulnerability Gather data sampling:      Not affected
Vulnerability Indirect target selection: Not affected
Vulnerability Itlb multihit:             Not affected
Vulnerability L1tf:                      Not affected
Vulnerability Mds:                       Not affected
Vulnerability Meltdown:                  Not affected
Vulnerability Mmio stale data:           Not affected
Vulnerability Reg file data sampling:    Not affected
Vulnerability Retbleed:                  Not affected
Vulnerability Spec rstack overflow:      Not affected
Vulnerability Spec store bypass:         Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1:                Mitigation; __user pointer sanitization
Vulnerability Spectre v2:                Mitigation; CSV2, BHB
Vulnerability Srbds:                     Not affected
Vulnerability Tsa:                       Not affected
Vulnerability Tsx async abort:           Not affected
Vulnerability Vmscape:                   Not affected
Details

Comparing HEAD and expr-stats-pruning
--------------------
Benchmark clickbench_partitioned.json
--------------------
┏━━━━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┓
┃ Query     ┃       HEAD ┃ expr-stats-pruning ┃       Change ┃
┡━━━━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━┩
│ QQuery 0  │    1.20 ms │            1.17 ms │    no change │
│ QQuery 1  │   12.12 ms │           11.91 ms │    no change │
│ QQuery 2  │   34.10 ms │           34.40 ms │    no change │
│ QQuery 3  │   31.30 ms │           31.50 ms │    no change │
│ QQuery 4  │  243.49 ms │          237.25 ms │    no change │
│ QQuery 5  │  279.13 ms │          279.24 ms │    no change │
│ QQuery 6  │    1.22 ms │            1.24 ms │    no change │
│ QQuery 7  │   13.31 ms │           13.83 ms │    no change │
│ QQuery 8  │  330.18 ms │          330.43 ms │    no change │
│ QQuery 9  │  470.33 ms │          474.30 ms │    no change │
│ QQuery 10 │   64.20 ms │           64.13 ms │    no change │
│ QQuery 11 │   75.26 ms │           75.29 ms │    no change │
│ QQuery 12 │  272.04 ms │          265.52 ms │    no change │
│ QQuery 13 │  362.78 ms │          361.53 ms │    no change │
│ QQuery 14 │  286.01 ms │          281.04 ms │    no change │
│ QQuery 15 │  289.68 ms │          284.87 ms │    no change │
│ QQuery 16 │  616.65 ms │          620.78 ms │    no change │
│ QQuery 17 │  628.75 ms │          631.30 ms │    no change │
│ QQuery 18 │ 1233.82 ms │         1234.69 ms │    no change │
│ QQuery 19 │   28.88 ms │           28.36 ms │    no change │
│ QQuery 20 │  519.09 ms │          517.12 ms │    no change │
│ QQuery 21 │  507.77 ms │          507.21 ms │    no change │
│ QQuery 22 │  980.04 ms │          985.75 ms │    no change │
│ QQuery 23 │ 3061.25 ms │         3061.20 ms │    no change │
│ QQuery 24 │   40.95 ms │           40.72 ms │    no change │
│ QQuery 25 │  104.07 ms │          105.20 ms │    no change │
│ QQuery 26 │   41.35 ms │           41.23 ms │    no change │
│ QQuery 27 │  511.69 ms │          511.96 ms │    no change │
│ QQuery 28 │ 2890.51 ms │         2889.45 ms │    no change │
│ QQuery 29 │   37.49 ms │           37.74 ms │    no change │
│ QQuery 30 │  304.80 ms │          310.04 ms │    no change │
│ QQuery 31 │  275.75 ms │          284.39 ms │    no change │
│ QQuery 32 │  943.57 ms │          948.79 ms │    no change │
│ QQuery 33 │ 1455.50 ms │         1472.04 ms │    no change │
│ QQuery 34 │ 1436.57 ms │         1528.60 ms │ 1.06x slower │
│ QQuery 35 │  292.81 ms │          297.96 ms │    no change │
│ QQuery 36 │   63.68 ms │           68.31 ms │ 1.07x slower │
│ QQuery 37 │   34.19 ms │           34.76 ms │    no change │
│ QQuery 38 │   39.03 ms │           38.72 ms │    no change │
│ QQuery 39 │  137.78 ms │          145.62 ms │ 1.06x slower │
│ QQuery 40 │   13.60 ms │           13.72 ms │    no change │
│ QQuery 41 │   12.71 ms │           13.08 ms │    no change │
│ QQuery 42 │   12.24 ms │           12.25 ms │    no change │
└───────────┴────────────┴────────────────────┴──────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┓
┃ Benchmark Summary                 ┃            ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━┩
│ Total Time (HEAD)                 │ 18990.90ms │
│ Total Time (expr-stats-pruning)   │ 19128.66ms │
│ Average Time (HEAD)               │   441.65ms │
│ Average Time (expr-stats-pruning) │   444.85ms │
│ Queries Faster                    │          0 │
│ Queries Slower                    │          3 │
│ Queries with No Change            │         40 │
│ Queries with Failure              │          0 │
└───────────────────────────────────┴────────────┘

Distribution per query (min / mean ±stddev / max):

Comparing HEAD and expr-stats-pruning
--------------------
Benchmark clickbench_partitioned.json
--------------------
┏━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┓
┃ Query     ┃                                   HEAD ┃                    expr-stats-pruning ┃        Change ┃
┡━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━┩
│ QQuery 0  │            1.20 / 1.81 ±1.14 / 4.08 ms │           1.17 / 1.79 ±1.12 / 4.02 ms │     no change │
│ QQuery 1  │         12.12 / 12.42 ±0.22 / 12.77 ms │        11.91 / 12.01 ±0.08 / 12.10 ms │     no change │
│ QQuery 2  │         34.10 / 34.37 ±0.32 / 34.78 ms │        34.40 / 34.69 ±0.26 / 35.05 ms │     no change │
│ QQuery 3  │         31.30 / 32.44 ±0.85 / 33.67 ms │        31.50 / 31.54 ±0.04 / 31.62 ms │     no change │
│ QQuery 4  │      243.49 / 245.19 ±1.40 / 246.93 ms │     237.25 / 240.19 ±2.09 / 242.68 ms │     no change │
│ QQuery 5  │      279.13 / 281.24 ±1.49 / 282.60 ms │     279.24 / 284.06 ±3.85 / 288.67 ms │     no change │
│ QQuery 6  │            1.22 / 1.38 ±0.24 / 1.86 ms │           1.24 / 1.40 ±0.25 / 1.89 ms │     no change │
│ QQuery 7  │         13.31 / 13.48 ±0.15 / 13.69 ms │        13.83 / 14.15 ±0.29 / 14.50 ms │     no change │
│ QQuery 8  │      330.18 / 333.43 ±2.68 / 337.29 ms │     330.43 / 334.94 ±3.39 / 339.80 ms │     no change │
│ QQuery 9  │      470.33 / 478.69 ±6.22 / 484.37 ms │     474.30 / 480.20 ±5.64 / 488.04 ms │     no change │
│ QQuery 10 │         64.20 / 68.04 ±6.80 / 81.62 ms │        64.13 / 65.59 ±1.07 / 67.33 ms │     no change │
│ QQuery 11 │         75.26 / 75.93 ±0.72 / 77.02 ms │        75.29 / 76.08 ±0.57 / 77.07 ms │     no change │
│ QQuery 12 │      272.04 / 277.43 ±4.40 / 283.44 ms │     265.52 / 273.43 ±5.58 / 280.45 ms │     no change │
│ QQuery 13 │      362.78 / 374.82 ±7.08 / 384.51 ms │    361.53 / 377.75 ±11.75 / 394.95 ms │     no change │
│ QQuery 14 │      286.01 / 289.52 ±2.95 / 293.32 ms │     281.04 / 287.19 ±5.95 / 298.18 ms │     no change │
│ QQuery 15 │      289.68 / 295.65 ±3.21 / 298.08 ms │    284.87 / 295.70 ±16.94 / 329.36 ms │     no change │
│ QQuery 16 │     616.65 / 630.49 ±11.85 / 651.56 ms │    620.78 / 637.58 ±10.86 / 651.75 ms │     no change │
│ QQuery 17 │      628.75 / 636.87 ±4.63 / 641.62 ms │     631.30 / 636.58 ±4.22 / 644.02 ms │     no change │
│ QQuery 18 │  1233.82 / 1256.63 ±20.91 / 1291.54 ms │ 1234.69 / 1288.45 ±30.97 / 1325.54 ms │     no change │
│ QQuery 19 │         28.88 / 31.29 ±3.73 / 38.60 ms │        28.36 / 28.89 ±0.47 / 29.67 ms │ +1.08x faster │
│ QQuery 20 │      519.09 / 529.81 ±9.02 / 544.42 ms │     517.12 / 526.78 ±8.29 / 542.04 ms │     no change │
│ QQuery 21 │      507.77 / 518.80 ±6.17 / 525.46 ms │     507.21 / 521.88 ±9.38 / 536.41 ms │     no change │
│ QQuery 22 │      980.04 / 988.10 ±5.55 / 993.73 ms │  985.75 / 1000.49 ±12.95 / 1023.04 ms │     no change │
│ QQuery 23 │  3061.25 / 3125.01 ±34.88 / 3166.08 ms │ 3061.20 / 3081.01 ±15.23 / 3095.59 ms │     no change │
│ QQuery 24 │        40.95 / 48.73 ±12.73 / 74.08 ms │       40.72 / 50.39 ±11.60 / 72.37 ms │     no change │
│ QQuery 25 │      104.07 / 106.46 ±2.71 / 111.69 ms │     105.20 / 110.02 ±6.56 / 123.04 ms │     no change │
│ QQuery 26 │         41.35 / 43.32 ±2.52 / 48.26 ms │        41.23 / 41.90 ±0.64 / 43.06 ms │     no change │
│ QQuery 27 │     511.69 / 519.64 ±11.53 / 542.43 ms │     511.96 / 521.24 ±4.77 / 524.87 ms │     no change │
│ QQuery 28 │  2890.51 / 2937.13 ±43.15 / 2993.57 ms │ 2889.45 / 2933.57 ±29.87 / 2982.75 ms │     no change │
│ QQuery 29 │         37.49 / 37.67 ±0.16 / 37.92 ms │       37.74 / 50.20 ±24.00 / 98.21 ms │  1.33x slower │
│ QQuery 30 │      304.80 / 309.77 ±3.91 / 315.29 ms │     310.04 / 315.34 ±7.34 / 329.73 ms │     no change │
│ QQuery 31 │     275.75 / 289.78 ±13.05 / 310.71 ms │     284.39 / 291.89 ±7.62 / 304.39 ms │     no change │
│ QQuery 32 │    943.57 / 984.28 ±33.53 / 1028.64 ms │   948.79 / 982.04 ±23.96 / 1010.94 ms │     no change │
│ QQuery 33 │  1455.50 / 1480.01 ±23.62 / 1510.48 ms │ 1472.04 / 1512.37 ±51.73 / 1613.48 ms │     no change │
│ QQuery 34 │ 1436.57 / 1548.10 ±143.69 / 1824.76 ms │ 1528.60 / 1562.42 ±27.63 / 1601.39 ms │     no change │
│ QQuery 35 │     292.81 / 325.22 ±46.33 / 417.17 ms │    297.96 / 345.70 ±54.70 / 448.39 ms │  1.06x slower │
│ QQuery 36 │         63.68 / 67.19 ±2.55 / 69.88 ms │        68.31 / 75.80 ±7.34 / 86.83 ms │  1.13x slower │
│ QQuery 37 │         34.19 / 35.33 ±1.43 / 38.15 ms │        34.76 / 36.79 ±2.26 / 41.19 ms │     no change │
│ QQuery 38 │         39.03 / 39.76 ±0.89 / 41.51 ms │        38.72 / 43.48 ±4.16 / 51.03 ms │  1.09x slower │
│ QQuery 39 │      137.78 / 149.12 ±7.07 / 157.23 ms │    145.62 / 155.82 ±11.01 / 173.40 ms │     no change │
│ QQuery 40 │         13.60 / 14.14 ±0.65 / 15.20 ms │        13.72 / 13.98 ±0.37 / 14.68 ms │     no change │
│ QQuery 41 │         12.71 / 15.61 ±3.30 / 19.99 ms │        13.08 / 13.25 ±0.26 / 13.75 ms │ +1.18x faster │
│ QQuery 42 │         12.24 / 13.45 ±2.15 / 17.75 ms │        12.25 / 12.49 ±0.23 / 12.82 ms │ +1.08x faster │
└───────────┴────────────────────────────────────────┴───────────────────────────────────────┴───────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┓
┃ Benchmark Summary                 ┃            ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━┩
│ Total Time (HEAD)                 │ 19497.58ms │
│ Total Time (expr-stats-pruning)   │ 19601.06ms │
│ Average Time (HEAD)               │   453.43ms │
│ Average Time (expr-stats-pruning) │   455.84ms │
│ Queries Faster                    │          3 │
│ Queries Slower                    │          4 │
│ Queries with No Change            │         36 │
│ Queries with Failure              │          0 │
└───────────────────────────────────┴────────────┘

Resource Usage

clickbench_partitioned — base (merge-base)

Metric Value
Wall time 100.0s
Peak memory 12.7 GiB
Avg memory 4.5 GiB
CPU user 994.0s
CPU sys 70.0s
Peak spill 0 B

clickbench_partitioned — branch

Metric Value
Wall time 100.0s
Peak memory 11.6 GiB
Avg memory 4.3 GiB
CPU user 997.2s
CPU sys 72.0s
Peak spill 0 B

File an issue against this benchmark runner

@adriangbot

Copy link
Copy Markdown

🤖 Benchmark completed (GKE) | trigger

Instance: c4a-highmem-16 (12 vCPU / 65 GiB)

Comparing expr-stats-pruning (b8122c6) to 915c5b6 (merge-base) diff

Run configuration
run benchmark clickbench_pushdown
Trigger comment
run benchmark tpch clickbench_partitioned clickbench_pushdown
CPU Details (lscpu)
Architecture:                            aarch64
CPU op-mode(s):                          64-bit
Byte Order:                              Little Endian
CPU(s):                                  16
On-line CPU(s) list:                     0-15
Vendor ID:                               ARM
Model name:                              Neoverse-V2
Model:                                   1
Thread(s) per core:                      1
Core(s) per cluster:                     16
Socket(s):                               -
Cluster(s):                              1
Stepping:                                r0p1
BogoMIPS:                                2000.00
Flags:                                   fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh rng bti
L1d cache:                               1 MiB (16 instances)
L1i cache:                               1 MiB (16 instances)
L2 cache:                                32 MiB (16 instances)
L3 cache:                                80 MiB (1 instance)
NUMA node(s):                            1
NUMA node0 CPU(s):                       0-15
Vulnerability Gather data sampling:      Not affected
Vulnerability Indirect target selection: Not affected
Vulnerability Itlb multihit:             Not affected
Vulnerability L1tf:                      Not affected
Vulnerability Mds:                       Not affected
Vulnerability Meltdown:                  Not affected
Vulnerability Mmio stale data:           Not affected
Vulnerability Reg file data sampling:    Not affected
Vulnerability Retbleed:                  Not affected
Vulnerability Spec rstack overflow:      Not affected
Vulnerability Spec store bypass:         Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1:                Mitigation; __user pointer sanitization
Vulnerability Spectre v2:                Mitigation; CSV2, BHB
Vulnerability Srbds:                     Not affected
Vulnerability Tsa:                       Not affected
Vulnerability Tsx async abort:           Not affected
Vulnerability Vmscape:                   Not affected
Details

Comparing HEAD and expr-stats-pruning
--------------------
Benchmark clickbench_pushdown.json
--------------------
┏━━━━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━┓
┃ Query     ┃       HEAD ┃ expr-stats-pruning ┃    Change ┃
┡━━━━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━┩
│ QQuery 0  │    1.17 ms │            1.19 ms │ no change │
│ QQuery 1  │   11.92 ms │           12.01 ms │ no change │
│ QQuery 2  │   35.14 ms │           34.48 ms │ no change │
│ QQuery 3  │   31.12 ms │           31.46 ms │ no change │
│ QQuery 4  │  234.58 ms │          235.45 ms │ no change │
│ QQuery 5  │  279.03 ms │          275.83 ms │ no change │
│ QQuery 6  │    1.23 ms │            1.21 ms │ no change │
│ QQuery 7  │   16.21 ms │           16.12 ms │ no change │
│ QQuery 8  │  324.42 ms │          324.38 ms │ no change │
│ QQuery 9  │  463.38 ms │          462.89 ms │ no change │
│ QQuery 10 │   85.60 ms │           84.86 ms │ no change │
│ QQuery 11 │   96.51 ms │           97.16 ms │ no change │
│ QQuery 12 │  279.01 ms │          281.60 ms │ no change │
│ QQuery 13 │  386.37 ms │          388.35 ms │ no change │
│ QQuery 14 │  297.11 ms │          295.80 ms │ no change │
│ QQuery 15 │  276.80 ms │          285.89 ms │ no change │
│ QQuery 16 │  607.65 ms │          614.29 ms │ no change │
│ QQuery 17 │  618.81 ms │          619.42 ms │ no change │
│ QQuery 18 │ 1197.22 ms │         1203.19 ms │ no change │
│ QQuery 19 │   30.63 ms │           29.58 ms │ no change │
│ QQuery 20 │  514.80 ms │          517.08 ms │ no change │
│ QQuery 21 │  537.66 ms │          556.09 ms │ no change │
│ QQuery 22 │  871.53 ms │          881.17 ms │ no change │
│ QQuery 23 │  103.23 ms │          105.23 ms │ no change │
│ QQuery 24 │   32.23 ms │           32.01 ms │ no change │
│ QQuery 25 │  105.08 ms │          105.41 ms │ no change │
│ QQuery 26 │   44.07 ms │           44.24 ms │ no change │
│ QQuery 27 │  553.61 ms │          551.67 ms │ no change │
│ QQuery 28 │ 2905.77 ms │         2890.63 ms │ no change │
│ QQuery 29 │   37.39 ms │           36.96 ms │ no change │
│ QQuery 30 │  297.14 ms │          299.08 ms │ no change │
│ QQuery 31 │  274.27 ms │          274.73 ms │ no change │
│ QQuery 32 │  930.34 ms │          935.46 ms │ no change │
│ QQuery 33 │ 1419.09 ms │         1431.20 ms │ no change │
│ QQuery 34 │ 1440.67 ms │         1484.46 ms │ no change │
│ QQuery 35 │  291.04 ms │          288.27 ms │ no change │
│ QQuery 36 │   61.64 ms │           63.16 ms │ no change │
│ QQuery 37 │   33.19 ms │           32.22 ms │ no change │
│ QQuery 38 │   32.71 ms │           31.97 ms │ no change │
│ QQuery 39 │  124.21 ms │          123.39 ms │ no change │
│ QQuery 40 │   15.73 ms │           15.32 ms │ no change │
│ QQuery 41 │   14.20 ms │           13.77 ms │ no change │
│ QQuery 42 │   12.58 ms │           12.27 ms │ no change │
└───────────┴────────────┴────────────────────┴───────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┓
┃ Benchmark Summary                 ┃            ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━┩
│ Total Time (HEAD)                 │ 15926.09ms │
│ Total Time (expr-stats-pruning)   │ 16020.96ms │
│ Average Time (HEAD)               │   370.37ms │
│ Average Time (expr-stats-pruning) │   372.58ms │
│ Queries Faster                    │          0 │
│ Queries Slower                    │          0 │
│ Queries with No Change            │         43 │
│ Queries with Failure              │          0 │
└───────────────────────────────────┴────────────┘

Distribution per query (min / mean ±stddev / max):

Comparing HEAD and expr-stats-pruning
--------------------
Benchmark clickbench_pushdown.json
--------------------
┏━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┓
┃ Query     ┃                                  HEAD ┃                    expr-stats-pruning ┃        Change ┃
┡━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━┩
│ QQuery 0  │           1.17 / 1.74 ±1.05 / 3.85 ms │           1.19 / 1.79 ±1.09 / 3.97 ms │     no change │
│ QQuery 1  │        11.92 / 12.02 ±0.09 / 12.18 ms │        12.01 / 12.19 ±0.12 / 12.34 ms │     no change │
│ QQuery 2  │        35.14 / 35.30 ±0.12 / 35.44 ms │        34.48 / 34.82 ±0.32 / 35.38 ms │     no change │
│ QQuery 3  │        31.12 / 31.76 ±0.87 / 33.45 ms │        31.46 / 31.72 ±0.21 / 32.02 ms │     no change │
│ QQuery 4  │     234.58 / 237.18 ±2.14 / 240.31 ms │     235.45 / 239.20 ±2.91 / 242.71 ms │     no change │
│ QQuery 5  │     279.03 / 280.31 ±1.74 / 283.76 ms │     275.83 / 281.36 ±3.66 / 286.14 ms │     no change │
│ QQuery 6  │           1.23 / 1.39 ±0.23 / 1.84 ms │           1.21 / 1.37 ±0.25 / 1.86 ms │     no change │
│ QQuery 7  │        16.21 / 16.31 ±0.07 / 16.42 ms │        16.12 / 16.25 ±0.13 / 16.49 ms │     no change │
│ QQuery 8  │     324.42 / 326.34 ±1.93 / 330.02 ms │     324.38 / 329.72 ±4.42 / 335.68 ms │     no change │
│ QQuery 9  │     463.38 / 470.10 ±3.57 / 474.12 ms │    462.89 / 474.57 ±11.24 / 492.88 ms │     no change │
│ QQuery 10 │        85.60 / 88.26 ±3.19 / 94.43 ms │        84.86 / 88.19 ±4.59 / 97.20 ms │     no change │
│ QQuery 11 │        96.51 / 97.21 ±0.93 / 98.99 ms │       97.16 / 99.56 ±3.57 / 106.62 ms │     no change │
│ QQuery 12 │     279.01 / 282.67 ±3.09 / 286.54 ms │     281.60 / 284.42 ±3.03 / 289.80 ms │     no change │
│ QQuery 13 │     386.37 / 399.09 ±8.23 / 411.91 ms │    388.35 / 400.19 ±10.32 / 414.06 ms │     no change │
│ QQuery 14 │     297.11 / 300.45 ±3.04 / 305.97 ms │     295.80 / 303.43 ±8.43 / 318.76 ms │     no change │
│ QQuery 15 │     276.80 / 284.14 ±4.62 / 289.69 ms │    285.89 / 301.70 ±10.85 / 315.78 ms │  1.06x slower │
│ QQuery 16 │    607.65 / 621.47 ±12.16 / 644.21 ms │     614.29 / 621.90 ±4.95 / 627.47 ms │     no change │
│ QQuery 17 │     618.81 / 624.72 ±5.69 / 633.64 ms │    619.42 / 637.39 ±13.57 / 657.76 ms │     no change │
│ QQuery 18 │  1197.22 / 1215.38 ±9.21 / 1221.89 ms │ 1203.19 / 1242.76 ±20.81 / 1261.79 ms │     no change │
│ QQuery 19 │       30.63 / 40.71 ±12.22 / 60.71 ms │       29.58 / 37.92 ±13.58 / 64.65 ms │ +1.07x faster │
│ QQuery 20 │    514.80 / 527.77 ±14.35 / 555.01 ms │     517.08 / 524.97 ±6.21 / 536.13 ms │     no change │
│ QQuery 21 │    537.66 / 550.49 ±11.02 / 565.18 ms │     556.09 / 558.54 ±3.51 / 565.48 ms │     no change │
│ QQuery 22 │     871.53 / 878.49 ±5.11 / 883.05 ms │    881.17 / 895.14 ±10.89 / 912.67 ms │     no change │
│ QQuery 23 │     103.23 / 113.32 ±7.43 / 123.82 ms │    105.23 / 118.69 ±15.34 / 148.13 ms │     no change │
│ QQuery 24 │        32.23 / 35.28 ±4.74 / 44.73 ms │        32.01 / 34.45 ±3.25 / 40.76 ms │     no change │
│ QQuery 25 │     105.08 / 108.17 ±3.39 / 114.46 ms │     105.41 / 109.99 ±4.89 / 119.02 ms │     no change │
│ QQuery 26 │        44.07 / 47.22 ±5.36 / 57.92 ms │        44.24 / 44.76 ±0.68 / 46.09 ms │ +1.05x faster │
│ QQuery 27 │    553.61 / 567.01 ±13.10 / 586.28 ms │    551.67 / 560.15 ±10.56 / 580.84 ms │     no change │
│ QQuery 28 │ 2905.77 / 2931.20 ±18.33 / 2961.46 ms │ 2890.63 / 2912.16 ±18.63 / 2934.10 ms │     no change │
│ QQuery 29 │        37.39 / 37.86 ±0.62 / 39.07 ms │        36.96 / 38.56 ±2.47 / 43.42 ms │     no change │
│ QQuery 30 │     297.14 / 305.57 ±6.61 / 313.14 ms │     299.08 / 304.83 ±6.73 / 317.99 ms │     no change │
│ QQuery 31 │     274.27 / 280.98 ±8.42 / 296.99 ms │    274.73 / 282.77 ±11.03 / 304.65 ms │     no change │
│ QQuery 32 │    930.34 / 943.59 ±11.88 / 963.29 ms │   935.46 / 962.78 ±34.05 / 1029.38 ms │     no change │
│ QQuery 33 │ 1419.09 / 1452.00 ±18.24 / 1474.28 ms │ 1431.20 / 1455.49 ±28.05 / 1509.12 ms │     no change │
│ QQuery 34 │ 1440.67 / 1496.02 ±46.77 / 1576.33 ms │ 1484.46 / 1527.02 ±73.75 / 1674.07 ms │     no change │
│ QQuery 35 │    291.04 / 326.93 ±56.98 / 439.86 ms │    288.27 / 310.37 ±19.01 / 334.51 ms │ +1.05x faster │
│ QQuery 36 │        61.64 / 66.97 ±3.93 / 72.59 ms │        63.16 / 67.41 ±5.04 / 76.59 ms │     no change │
│ QQuery 37 │        33.19 / 39.59 ±5.48 / 46.84 ms │        32.22 / 38.00 ±6.33 / 47.00 ms │     no change │
│ QQuery 38 │        32.71 / 35.61 ±2.19 / 39.21 ms │        31.97 / 35.37 ±3.15 / 39.75 ms │     no change │
│ QQuery 39 │    124.21 / 138.27 ±10.42 / 154.15 ms │     123.39 / 135.27 ±7.17 / 145.70 ms │     no change │
│ QQuery 40 │        15.73 / 18.73 ±4.83 / 28.29 ms │        15.32 / 15.52 ±0.25 / 16.00 ms │ +1.21x faster │
│ QQuery 41 │        14.20 / 14.36 ±0.13 / 14.51 ms │        13.77 / 13.92 ±0.10 / 14.04 ms │     no change │
│ QQuery 42 │        12.58 / 14.24 ±2.91 / 20.06 ms │        12.27 / 15.38 ±4.00 / 22.24 ms │  1.08x slower │
└───────────┴───────────────────────────────────────┴───────────────────────────────────────┴───────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┓
┃ Benchmark Summary                 ┃            ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━┩
│ Total Time (HEAD)                 │ 16296.23ms │
│ Total Time (expr-stats-pruning)   │ 16402.00ms │
│ Average Time (HEAD)               │   378.98ms │
│ Average Time (expr-stats-pruning) │   381.44ms │
│ Queries Faster                    │          4 │
│ Queries Slower                    │          2 │
│ Queries with No Change            │         37 │
│ Queries with Failure              │          0 │
└───────────────────────────────────┴────────────┘

Resource Usage

clickbench_pushdown — base (merge-base)

Metric Value
Wall time 85.0s
Peak memory 12.2 GiB
Avg memory 4.8 GiB
CPU user 827.9s
CPU sys 57.2s
Peak spill 0 B

clickbench_pushdown — branch

Metric Value
Wall time 85.0s
Peak memory 12.6 GiB
Avg memory 5.1 GiB
CPU user 829.9s
CPU sys 58.9s
Peak spill 0 B

File an issue against this benchmark runner

adriangb and others added 4 commits December 4, 2026 17:25
The rewrite of a pruning predicate identifies each statistic that it
reads by a `phys_expr::Column`. So only a column can have statistics.

Identify each statistic by two values:

| Value    | Type                    | Use                                    |
|----------|-------------------------|----------------------------------------|
| `expr`   | `Arc<dyn PhysicalExpr>` | The rewrite finds and replaces it      |
| `target` | `Column`                | The statistics source reads by it      |

`PredicateBuildContext::resolve` returns the target of an expression.
It accepts columns only, so the predicates do not change. The internal
functions take the context in place of the schema, and
`RequiredColumns` stores a `RequiredStatistic` struct in place of a
tuple.

This commit changes no public API. The next commit makes the target
type a parameter.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
A PruningPredicate can read the statistics of columns only, and it names
them by column name. A statistics source that has statistics for other
expressions, such as the leaf column of a struct field, cannot say so.

Add StatisticsResolver. Its resolve method returns a target for each
expression that has statistics, or None. The predicate stores the
target and passes it back to the statistics source when it prunes, so
the check "can the predicate use this expression" and the answer
"which statistics does it read" are one call.

| Item                    | Change                                      |
|-------------------------|---------------------------------------------|
| PruningPredicate        | Gets a target type parameter, default Column |
| RequiredColumns         | Same                                        |
| PruningPredicateBuilder | Gets with_resolver, default ColumnResolver  |
| PruningStatisticsSource | New trait: PruningStatistics for a target   |

Every PruningStatistics implements PruningStatisticsSource<Column>, so
existing code compiles without changes. The predicates that the default
resolver builds do not change.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The Parquet statistics sources find the leaf column of a predicate
column by name, each time the predicate reads a statistic. Row group
statistics, bloom filters and the page index each do this in their own
way. A name can only identify a top-level column.

Resolve each expression of a pruning predicate to a
ParquetStatisticsTarget (leaf index and Arrow field) when the predicate
is built for a file. The three statistics sources read by target.

| Build site                              | Resolver                        |
|-----------------------------------------|---------------------------------|
| Opener, push decoder, inverted predicate | ParquetStatisticsResolver       |
| Plan display, which has no file         | ArrowStatisticsResolver         |
| Public methods that take a PruningPredicate | Build it again for the file |

PagePruningAccessPlanFilter::new has no Parquet schema, so it must
build its predicates again for each file. Deprecate it in favor of
new_with_parquet_schema.

The resolvers accept columns only, so pruning results do not change.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Parquet keeps min/max values, null counts, a page index and a bloom
filter for the leaf column of every struct field. A filter such as
`s['a'] > 15` uses none of them, because the scan resolves only
columns to leaf columns.

Resolve `get_field(s, 'a')`, and chains of it, to the leaf column of
the field. This is the one place that inspects the function. Row group
statistics, bloom filters, the page index, full match detection and
dynamic filters then work for struct fields as they do for columns,
with no other change.

A path through a map or a list has no target, and neither has a field
of a nested type.

The slt diff shows the effect on each access path.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@adriangb

adriangb commented Dec 4, 2026

Copy link
Copy Markdown
Contributor Author

run benchmark clickbench_partitioned

@adriangbot

Copy link
Copy Markdown

🤖 Benchmark running (GKE) | trigger
Instance: c4a-highmem-16 (12 vCPU / 65 GiB) | Linux bench-c7427356247-6245-bjrbb 6.12.105+ #1 SMP Sat Sep 19 07:55:25 UTC 2026 aarch64 GNU/Linux

CPU Details (lscpu)
Architecture:                            aarch64
CPU op-mode(s):                          64-bit
Byte Order:                              Little Endian
CPU(s):                                  16
On-line CPU(s) list:                     0-15
Vendor ID:                               ARM
Model name:                              Neoverse-V2
Model:                                   1
Thread(s) per core:                      1
Core(s) per cluster:                     16
Socket(s):                               -
Cluster(s):                              1
Stepping:                                r0p1
BogoMIPS:                                2000.00
Flags:                                   fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh rng bti
L1d cache:                               1 MiB (16 instances)
L1i cache:                               1 MiB (16 instances)
L2 cache:                                32 MiB (16 instances)
L3 cache:                                80 MiB (1 instance)
NUMA node(s):                            1
NUMA node0 CPU(s):                       0-15
Vulnerability Gather data sampling:      Not affected
Vulnerability Indirect target selection: Not affected
Vulnerability Itlb multihit:             Not affected
Vulnerability L1tf:                      Not affected
Vulnerability Mds:                       Not affected
Vulnerability Meltdown:                  Not affected
Vulnerability Mmio stale data:           Not affected
Vulnerability Reg file data sampling:    Not affected
Vulnerability Retbleed:                  Not affected
Vulnerability Spec rstack overflow:      Not affected
Vulnerability Spec store bypass:         Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1:                Mitigation; __user pointer sanitization
Vulnerability Spectre v2:                Mitigation; CSV2, BHB
Vulnerability Srbds:                     Not affected
Vulnerability Tsa:                       Not affected
Vulnerability Tsx async abort:           Not affected
Vulnerability Vmscape:                   Not affected

Comparing expr-stats-pruning (6ed43c9) to 915c5b6 (merge-base) diff

Run configuration
run benchmark clickbench_partitioned
Trigger comment
run benchmark clickbench_partitioned

Results will be posted here when complete


File an issue against this benchmark runner

@adriangbot

Copy link
Copy Markdown

🤖 Benchmark completed (GKE) | trigger

Instance: c4a-highmem-16 (12 vCPU / 65 GiB)

Comparing expr-stats-pruning (6ed43c9) to 915c5b6 (merge-base) diff

Run configuration
run benchmark clickbench_partitioned
Trigger comment
run benchmark clickbench_partitioned
CPU Details (lscpu)
Architecture:                            aarch64
CPU op-mode(s):                          64-bit
Byte Order:                              Little Endian
CPU(s):                                  16
On-line CPU(s) list:                     0-15
Vendor ID:                               ARM
Model name:                              Neoverse-V2
Model:                                   1
Thread(s) per core:                      1
Core(s) per cluster:                     16
Socket(s):                               -
Cluster(s):                              1
Stepping:                                r0p1
BogoMIPS:                                2000.00
Flags:                                   fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh rng bti
L1d cache:                               1 MiB (16 instances)
L1i cache:                               1 MiB (16 instances)
L2 cache:                                32 MiB (16 instances)
L3 cache:                                80 MiB (1 instance)
NUMA node(s):                            1
NUMA node0 CPU(s):                       0-15
Vulnerability Gather data sampling:      Not affected
Vulnerability Indirect target selection: Not affected
Vulnerability Itlb multihit:             Not affected
Vulnerability L1tf:                      Not affected
Vulnerability Mds:                       Not affected
Vulnerability Meltdown:                  Not affected
Vulnerability Mmio stale data:           Not affected
Vulnerability Reg file data sampling:    Not affected
Vulnerability Retbleed:                  Not affected
Vulnerability Spec rstack overflow:      Not affected
Vulnerability Spec store bypass:         Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1:                Mitigation; __user pointer sanitization
Vulnerability Spectre v2:                Mitigation; CSV2, BHB
Vulnerability Srbds:                     Not affected
Vulnerability Tsa:                       Not affected
Vulnerability Tsx async abort:           Not affected
Vulnerability Vmscape:                   Not affected
Details

Comparing HEAD and expr-stats-pruning
--------------------
Benchmark clickbench_partitioned.json
--------------------
┏━━━━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┓
┃ Query     ┃       HEAD ┃ expr-stats-pruning ┃       Change ┃
┡━━━━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━┩
│ QQuery 0  │    1.18 ms │            1.21 ms │    no change │
│ QQuery 1  │   11.81 ms │           12.08 ms │    no change │
│ QQuery 2  │   33.99 ms │           34.26 ms │    no change │
│ QQuery 3  │   30.72 ms │           31.25 ms │    no change │
│ QQuery 4  │  235.31 ms │          241.95 ms │    no change │
│ QQuery 5  │  276.72 ms │          279.99 ms │    no change │
│ QQuery 6  │    1.19 ms │            1.20 ms │    no change │
│ QQuery 7  │   13.00 ms │           13.51 ms │    no change │
│ QQuery 8  │  322.89 ms │          335.80 ms │    no change │
│ QQuery 9  │  464.25 ms │          460.82 ms │    no change │
│ QQuery 10 │   63.00 ms │           64.67 ms │    no change │
│ QQuery 11 │   73.95 ms │           75.44 ms │    no change │
│ QQuery 12 │  259.13 ms │          268.64 ms │    no change │
│ QQuery 13 │  362.57 ms │          379.73 ms │    no change │
│ QQuery 14 │  275.65 ms │          286.56 ms │    no change │
│ QQuery 15 │  285.12 ms │          290.48 ms │    no change │
│ QQuery 16 │  609.25 ms │          631.69 ms │    no change │
│ QQuery 17 │  613.87 ms │          637.17 ms │    no change │
│ QQuery 18 │ 1180.90 ms │         1247.57 ms │ 1.06x slower │
│ QQuery 19 │   28.10 ms │           28.10 ms │    no change │
│ QQuery 20 │  516.63 ms │          518.62 ms │    no change │
│ QQuery 21 │  502.73 ms │          512.24 ms │    no change │
│ QQuery 22 │  970.93 ms │          990.38 ms │    no change │
│ QQuery 23 │ 3047.52 ms │         3065.83 ms │    no change │
│ QQuery 24 │   40.50 ms │           40.98 ms │    no change │
│ QQuery 25 │  103.72 ms │          105.54 ms │    no change │
│ QQuery 26 │   41.22 ms │           41.55 ms │    no change │
│ QQuery 27 │  514.19 ms │          515.54 ms │    no change │
│ QQuery 28 │ 2883.30 ms │         2914.09 ms │    no change │
│ QQuery 29 │   37.95 ms │           37.35 ms │    no change │
│ QQuery 30 │  306.25 ms │          303.26 ms │    no change │
│ QQuery 31 │  277.85 ms │          279.62 ms │    no change │
│ QQuery 32 │  966.83 ms │          970.57 ms │    no change │
│ QQuery 33 │ 1452.36 ms │         1478.26 ms │    no change │
│ QQuery 34 │ 1508.49 ms │         1489.65 ms │    no change │
│ QQuery 35 │  299.73 ms │          298.75 ms │    no change │
│ QQuery 36 │   64.64 ms │           67.29 ms │    no change │
│ QQuery 37 │   35.84 ms │           34.69 ms │    no change │
│ QQuery 38 │   40.04 ms │           38.94 ms │    no change │
│ QQuery 39 │  139.19 ms │          141.63 ms │    no change │
│ QQuery 40 │   13.89 ms │           13.64 ms │    no change │
│ QQuery 41 │   12.90 ms │           12.74 ms │    no change │
│ QQuery 42 │   12.09 ms │           12.15 ms │    no change │
└───────────┴────────────┴────────────────────┴──────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┓
┃ Benchmark Summary                 ┃            ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━┩
│ Total Time (HEAD)                 │ 18931.41ms │
│ Total Time (expr-stats-pruning)   │ 19205.45ms │
│ Average Time (HEAD)               │   440.27ms │
│ Average Time (expr-stats-pruning) │   446.64ms │
│ Queries Faster                    │          0 │
│ Queries Slower                    │          1 │
│ Queries with No Change            │         42 │
│ Queries with Failure              │          0 │
└───────────────────────────────────┴────────────┘

Distribution per query (min / mean ±stddev / max):

Comparing HEAD and expr-stats-pruning
--------------------
Benchmark clickbench_partitioned.json
--------------------
┏━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┓
┃ Query     ┃                                  HEAD ┃                    expr-stats-pruning ┃        Change ┃
┡━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━┩
│ QQuery 0  │           1.18 / 1.76 ±1.09 / 3.94 ms │           1.21 / 1.86 ±1.17 / 4.20 ms │  1.06x slower │
│ QQuery 1  │        11.81 / 11.94 ±0.14 / 12.16 ms │        12.08 / 12.19 ±0.08 / 12.32 ms │     no change │
│ QQuery 2  │        33.99 / 34.39 ±0.24 / 34.61 ms │        34.26 / 34.53 ±0.17 / 34.77 ms │     no change │
│ QQuery 3  │        30.72 / 31.78 ±1.08 / 33.60 ms │        31.25 / 31.67 ±0.42 / 32.23 ms │     no change │
│ QQuery 4  │     235.31 / 238.35 ±2.46 / 242.32 ms │     241.95 / 244.77 ±1.92 / 247.02 ms │     no change │
│ QQuery 5  │     276.72 / 280.50 ±3.81 / 287.25 ms │     279.99 / 283.32 ±2.80 / 287.91 ms │     no change │
│ QQuery 6  │           1.19 / 1.36 ±0.23 / 1.81 ms │           1.20 / 1.36 ±0.24 / 1.82 ms │     no change │
│ QQuery 7  │        13.00 / 13.19 ±0.20 / 13.56 ms │        13.51 / 13.98 ±0.67 / 15.30 ms │  1.06x slower │
│ QQuery 8  │     322.89 / 329.54 ±5.48 / 336.22 ms │     335.80 / 338.91 ±2.42 / 342.51 ms │     no change │
│ QQuery 9  │    464.25 / 477.18 ±11.24 / 497.07 ms │    460.82 / 478.48 ±12.51 / 495.55 ms │     no change │
│ QQuery 10 │        63.00 / 67.79 ±8.23 / 84.20 ms │       64.67 / 73.16 ±11.15 / 93.62 ms │  1.08x slower │
│ QQuery 11 │        73.95 / 74.80 ±0.74 / 75.91 ms │        75.44 / 75.81 ±0.36 / 76.27 ms │     no change │
│ QQuery 12 │     259.13 / 263.68 ±3.83 / 270.04 ms │     268.64 / 275.91 ±6.00 / 285.34 ms │     no change │
│ QQuery 13 │     362.57 / 372.53 ±8.58 / 388.20 ms │    379.73 / 391.63 ±12.78 / 409.76 ms │  1.05x slower │
│ QQuery 14 │     275.65 / 278.58 ±2.64 / 282.64 ms │    286.56 / 300.50 ±13.37 / 321.15 ms │  1.08x slower │
│ QQuery 15 │     285.12 / 288.24 ±3.12 / 293.61 ms │     290.48 / 296.01 ±5.22 / 305.63 ms │     no change │
│ QQuery 16 │     609.25 / 618.63 ±6.88 / 627.15 ms │     631.69 / 635.17 ±4.20 / 643.14 ms │     no change │
│ QQuery 17 │     613.87 / 622.71 ±7.04 / 628.90 ms │    637.17 / 659.24 ±30.99 / 720.57 ms │  1.06x slower │
│ QQuery 18 │ 1180.90 / 1220.77 ±25.89 / 1246.86 ms │  1247.57 / 1260.37 ±8.16 / 1271.55 ms │     no change │
│ QQuery 19 │        28.10 / 31.89 ±5.12 / 41.33 ms │        28.10 / 28.42 ±0.35 / 29.05 ms │ +1.12x faster │
│ QQuery 20 │    516.63 / 526.11 ±10.23 / 545.58 ms │    518.62 / 528.65 ±12.58 / 553.42 ms │     no change │
│ QQuery 21 │     502.73 / 512.83 ±8.10 / 526.73 ms │     512.24 / 516.58 ±4.64 / 525.46 ms │     no change │
│ QQuery 22 │     970.93 / 979.82 ±9.28 / 996.99 ms │    990.38 / 997.96 ±7.72 / 1008.64 ms │     no change │
│ QQuery 23 │ 3047.52 / 3087.17 ±25.48 / 3122.67 ms │ 3065.83 / 3121.05 ±49.26 / 3196.60 ms │     no change │
│ QQuery 24 │        40.50 / 41.38 ±0.62 / 42.29 ms │        40.98 / 42.76 ±1.50 / 45.48 ms │     no change │
│ QQuery 25 │     103.72 / 105.26 ±0.80 / 105.95 ms │     105.54 / 106.61 ±0.92 / 108.06 ms │     no change │
│ QQuery 26 │        41.22 / 41.39 ±0.09 / 41.44 ms │        41.55 / 42.06 ±0.51 / 42.77 ms │     no change │
│ QQuery 27 │     514.19 / 520.04 ±5.56 / 529.81 ms │    515.54 / 534.31 ±20.24 / 569.56 ms │     no change │
│ QQuery 28 │ 2883.30 / 2922.06 ±33.50 / 2974.29 ms │ 2914.09 / 2946.22 ±36.54 / 3015.30 ms │     no change │
│ QQuery 29 │      37.95 / 57.63 ±28.12 / 112.38 ms │        37.35 / 39.63 ±3.90 / 47.41 ms │ +1.45x faster │
│ QQuery 30 │     306.25 / 315.16 ±6.86 / 325.52 ms │     303.26 / 314.46 ±9.47 / 331.31 ms │     no change │
│ QQuery 31 │     277.85 / 292.05 ±9.89 / 306.92 ms │    279.62 / 294.02 ±14.55 / 321.74 ms │     no change │
│ QQuery 32 │  966.83 / 1025.98 ±54.53 / 1124.49 ms │     970.57 / 979.63 ±8.69 / 992.44 ms │     no change │
│ QQuery 33 │ 1452.36 / 1487.33 ±20.66 / 1512.22 ms │ 1478.26 / 1511.12 ±24.69 / 1536.50 ms │     no change │
│ QQuery 34 │ 1508.49 / 1531.31 ±23.76 / 1573.91 ms │ 1489.65 / 1557.46 ±42.73 / 1620.01 ms │     no change │
│ QQuery 35 │    299.73 / 326.22 ±28.28 / 372.79 ms │    298.75 / 327.11 ±36.51 / 391.10 ms │     no change │
│ QQuery 36 │        64.64 / 67.43 ±3.54 / 74.41 ms │        67.29 / 76.83 ±6.06 / 84.10 ms │  1.14x slower │
│ QQuery 37 │        35.84 / 39.71 ±4.69 / 46.97 ms │        34.69 / 38.56 ±6.49 / 51.48 ms │     no change │
│ QQuery 38 │        40.04 / 42.37 ±1.35 / 43.71 ms │        38.94 / 40.72 ±1.47 / 42.75 ms │     no change │
│ QQuery 39 │    139.19 / 153.43 ±10.15 / 166.80 ms │     141.63 / 150.90 ±5.05 / 155.95 ms │     no change │
│ QQuery 40 │        13.89 / 16.30 ±4.12 / 24.51 ms │        13.64 / 13.89 ±0.16 / 14.09 ms │ +1.17x faster │
│ QQuery 41 │        12.90 / 13.13 ±0.25 / 13.60 ms │        12.74 / 12.88 ±0.10 / 13.03 ms │     no change │
│ QQuery 42 │        12.09 / 12.36 ±0.15 / 12.54 ms │        12.15 / 12.41 ±0.25 / 12.84 ms │     no change │
└───────────┴───────────────────────────────────────┴───────────────────────────────────────┴───────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┓
┃ Benchmark Summary                 ┃            ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━┩
│ Total Time (HEAD)                 │ 19376.07ms │
│ Total Time (expr-stats-pruning)   │ 19643.13ms │
│ Average Time (HEAD)               │   450.61ms │
│ Average Time (expr-stats-pruning) │   456.82ms │
│ Queries Faster                    │          3 │
│ Queries Slower                    │          7 │
│ Queries with No Change            │         33 │
│ Queries with Failure              │          0 │
└───────────────────────────────────┴────────────┘

Resource Usage

clickbench_partitioned — base (merge-base)

Metric Value
Wall time 100.0s
Peak memory 13.1 GiB
Avg memory 4.7 GiB
CPU user 988.1s
CPU sys 71.5s
Peak spill 0 B

clickbench_partitioned — branch

Metric Value
Wall time 100.0s
Peak memory 12.5 GiB
Avg memory 4.7 GiB
CPU user 998.2s
CPU sys 72.4s
Peak spill 0 B

File an issue against this benchmark runner

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

datasource Changes to the datasource crate documentation Improvements or additions to documentation physical-expr Changes to the physical-expr crates sqllogictest SQL Logic Tests (.slt)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support row group pruning for struct field predicates

4 participants