Skip to content

feat(vortex-array): union_child_validities expr helper#8829

Merged
connortsui20 merged 2 commits into
developfrom
nemo/expr-union-child-validities
Jul 17, 2026
Merged

feat(vortex-array): union_child_validities expr helper#8829
connortsui20 merged 2 commits into
developfrom
nemo/expr-union-child-validities

Conversation

@HarukiMoriarty

@HarukiMoriarty HarukiMoriarty commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

What

Adds vortex_array::expr::union_child_validities(expr): the conjunction of an expression's child validities (result is null iff any operand is null). This is the common ScalarFnVTable::validity() for null-propagating kernels (comparisons, arithmetic, most geo/tensor ops), letting the planner derive the output null mask without executing the kernel.

Migrates vortex-tensor's four scalar functions (InnerProduct, CosineSimilarity, L2Denorm, L2Norm) onto it, replacing their inline and(child validities).

Add expr::union_child_validities — the conjunction of an expression's child
validities (result null iff any operand is null), the common ScalarFnVTable
validity() for null-propagating kernels. Migrate vortex-tensor's four scalar
functions (InnerProduct, CosineSimilarity, L2Denorm, L2Norm) onto it, replacing
their inline and(child validities).

Signed-off-by: Nemo Yu <zyu379@wisc.edu>
@HarukiMoriarty
HarukiMoriarty force-pushed the nemo/expr-union-child-validities branch from 9e0d68e to f81df62 Compare July 17, 2026 17:40

@connortsui20 connortsui20 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nice

@connortsui20
connortsui20 enabled auto-merge (squash) July 17, 2026 17:42
@github-actions

github-actions Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Polar Signals Profiling Results

Latest Run

Status Commit Job Attempt Link
🟢 Done d7c6f0b 1 Explore Profiling Data
Previous Runs (2)
Status Commit Job Attempt Link
🟢 Done f81df62 1 Explore Profiling Data
🟢 Done 9e0d68e 1 Explore Profiling Data

Powered by Polar Signals Cloud

@github-actions

github-actions Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Benchmarks: Vortex queries 📖

Verdict: No clear signal (low confidence)
Attributed Vortex impact: +5.0%
Engines: DataFusion Likely regression (+11.3%, high confidence) · DuckDB No clear signal (-1.0%, low confidence)
Vortex (geomean): 0.989x ➖
Parquet (geomean): 0.965x ➖
Shifts: Parquet (control) -3.5% · Median polish -0.2%

How to read Verdict and Engines
  • Verdict: Overall PR-level signal after subtracting baseline drift estimated from Parquet control rows. It can be Likely improvement, Likely regression, or No clear signal.
  • Engines: Per-engine attribution. DataFusion is compared against DataFusion/Parquet controls; DuckDB is compared against DuckDB/Parquet controls. This answers whether each engine improved or regressed independently.
  • Confidence: Based on directional consistency, share of rows above the noise floor, and control-run noise.

datafusion / vortex-file-compressed (1.033x ➖, 0↑ 0↓)
name PR d7c6f0b (ns) base ef056d5 (ns) ratio (PR/base)
vortex_q00/datafusion:vortex-file-compressed 9840787 9460679 1.04
vortex_q01/datafusion:vortex-file-compressed 6326899 6167913 1.03
datafusion / parquet (0.928x ➖, 0↑ 0↓)
name PR d7c6f0b (ns) base ef056d5 (ns) ratio (PR/base)
vortex_q00/datafusion:parquet 20117572 21787016 0.92
vortex_q01/datafusion:parquet 4591443 4926470 0.93
duckdb / vortex-file-compressed (0.993x ➖, 0↑ 0↓)
name PR d7c6f0b (ns) base ef056d5 (ns) ratio (PR/base)
vortex_q00/duckdb:vortex-file-compressed 10258012 10396154 0.99
vortex_q01/duckdb:vortex-file-compressed 6162028 6162290 1.00
duckdb / parquet (1.003x ➖, 0↑ 0↓)
name PR d7c6f0b (ns) base ef056d5 (ns) ratio (PR/base)
vortex_q00/duckdb:parquet 23459055 23446999 1.00
vortex_q01/duckdb:parquet 9439569 9381893 1.01

No file size changes detected.

HarukiMoriarty added a commit that referenced this pull request Jul 17, 2026
Make the binary geo scalar functions (ST_Distance, ST_Intersects, ST_Contains)
null-propagating: a nullable geometry operand is allowed, and any row whose
geometry input is null yields a null result (null in -> null out), matching
SQL/OGC and the other Vortex binary kernels.

- validate_geometry_operands no longer rejects nullable operands
- return_dtype mirrors operand nullability; validity() uses the shared
  vortex_array::expr::union_child_validities (#8829); is_null_sensitive = false
- shared execute module filters null rows before decoding, computes over the
  rows valid in both operands, and scatters results back under the combined mask
- prune: query_aabb declines a null geometry literal instead of erroring
- GeometryAabb::accumulate skips null rows so placeholders don't widen the box
- tests for nullable columns, constant-null, column/column, empty input

Signed-off-by: Nemo Yu <zyu379@wisc.edu>
@connortsui20
connortsui20 merged commit e6eeaae into develop Jul 17, 2026
73 checks passed
@connortsui20
connortsui20 deleted the nemo/expr-union-child-validities branch July 17, 2026 17:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog/feature A new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants