Skip to content

Prunning expressions can reference rowcount #7589

Open
robert3005 wants to merge 1 commit intodevelopfrom
rk/rowcount
Open

Prunning expressions can reference rowcount #7589
robert3005 wants to merge 1 commit intodevelopfrom
rk/rowcount

Conversation

@robert3005
Copy link
Copy Markdown
Contributor

@robert3005 robert3005 commented Apr 22, 2026

This lets us effectively prune expressions like IsNotNull

fix #7187

Signed-off-by: Robert Kruszewski github@robertk.io

Comment thread vortex-layout/src/layouts/zoned/zone_map.rs Outdated
Comment thread vortex-layout/src/layouts/zoned/zone_map.rs Outdated
@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented Apr 22, 2026

Merging this PR will improve performance by 31.85%

⚠️ Different runtime environments detected

Some benchmarks with significant performance changes were compared across different runtime environments,
which may affect the accuracy of the results.

Open the report in CodSpeed to investigate

⚡ 10 improved benchmarks
✅ 1153 untouched benchmarks

Performance Changes

Mode Benchmark BASE HEAD Efficiency
Simulation varbinview_zip_fragmented_mask 7.3 ms 6.5 ms +11.47%
Simulation varbinview_zip_block_mask 3.7 ms 2.9 ms +27.64%
Simulation old_alp_prim_test_between[f64, 16384] 212.3 µs 188 µs +12.94%
Simulation old_bp_prim_test_between[i32, 16384] 162.1 µs 146.2 µs +10.88%
Simulation old_bp_prim_test_between[i64, 16384] 203.3 µs 170.9 µs +18.91%
Simulation old_bp_prim_test_between[i32, 32768] 233 µs 202 µs +15.34%
Simulation new_alp_prim_test_between[f64, 16384] 147.6 µs 125.2 µs +17.84%
Simulation new_alp_prim_test_between[f32, 32768] 182.9 µs 138.7 µs +31.85%
Simulation new_alp_prim_test_between[f64, 32768] 235.3 µs 190.9 µs +23.23%
Simulation new_bp_prim_test_between[i32, 32768] 169 µs 140.2 µs +20.59%

Comparing rk/rowcount (7f6cd51) with develop (c91d833)

Open in CodSpeed

Comment thread vortex-array/src/expr/pruning/pruning_expr.rs Outdated
@robert3005
Copy link
Copy Markdown
Contributor Author

I have tried making it an expression. The problem you run into is that this expression isn't constant so you can't rewrite it into literal but also that expression cannot be inferred from the existing arrays properties

@robert3005
Copy link
Copy Markdown
Contributor Author

Ok, this is good to go now, a lot more code than I'd wish but at least it's pure array rewrite

This lets us effectively prune expressions like IsNotNull

Signed-off-by: Robert Kruszewski <github@robertk.io>
@robert3005 robert3005 changed the title Support returning row count in prunning aggregate expressions Prunning expressions can reference rowcount Apr 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog/fix A bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add RowCount stat to zone maps for more precise pruning

2 participants