Skip to content

Conversation

@gatesn
Copy link
Contributor

@gatesn gatesn commented Dec 10, 2025

No description provided.

gatesn and others added 30 commits December 4, 2025 07:29
We proved the idea out with ScalarFns, but realised we can minimize the
diff for end-users if we actually just re-purpose an expression to == a
scalar function. It pretty much was already anyway.

This PR is a step on the way to having Expression -> Array be a
constant-time operation, with actual compute deferred until we execute
the array tree.

# Breaking Changes

* Expression VTable changes
  * `Instance` renamed to `Options` to make the purpose more obvious 
* Added an `Arity` function to replace `validate`, since the only
possible validation in the absence of types is arity based anyway.
* Added an optional `execute` function that will replace `evaluate` in
the future.
* Removed `fmt_data` in favor of requiring a Display bound on the
associated Options type.
* `return_dtype` takes a `ReturnDTypeCtx` to avoid eagerly computing
child dtypes.
* Removed ExpressionView in favor of returning the options from
`Expression::as_` and `Expression::as_opt`.

Other changes that I don't expect will impact users:
* Moved `is_null_sensitive` and `child_name` from `Expression`, to
`ExpressionSignature`
* Moved `Expression::serialize_metadata()` to
`Expression::options().serialize()`
* Removed ExprOptimizer, in favor of `VTable::simplify`. Any more
complex optimizations can be implemented in future over the Array tree
prior to execution.

---------

Signed-off-by: Nicholas Gates <nick@nickgates.com>
Signed-off-by: Nicholas Gates <nick@nickgates.com>
Signed-off-by: Nicholas Gates <nick@nickgates.com>
Signed-off-by: Nicholas Gates <nick@nickgates.com>
Signed-off-by: Nicholas Gates <nick@nickgates.com>
Signed-off-by: Nicholas Gates <nick@nickgates.com>
Signed-off-by: Nicholas Gates <nick@nickgates.com>
Signed-off-by: Nicholas Gates <nick@nickgates.com>
Signed-off-by: Nicholas Gates <nick@nickgates.com>
Signed-off-by: Nicholas Gates <nick@nickgates.com>
Signed-off-by: Nicholas Gates <nick@nickgates.com>
Signed-off-by: Nicholas Gates <nick@nickgates.com>
Signed-off-by: Nicholas Gates <nick@nickgates.com>
Signed-off-by: Nicholas Gates <nick@nickgates.com>
Signed-off-by: Nicholas Gates <nick@nickgates.com>
Signed-off-by: Nicholas Gates <nick@nickgates.com>
Signed-off-by: Nicholas Gates <nick@nickgates.com>
Signed-off-by: Nicholas Gates <nick@nickgates.com>
Signed-off-by: Nicholas Gates <nick@nickgates.com>
Signed-off-by: Nicholas Gates <nick@nickgates.com>
Signed-off-by: Nicholas Gates <nick@nickgates.com>
Signed-off-by: Nicholas Gates <nick@nickgates.com>
Signed-off-by: Nicholas Gates <nick@nickgates.com>
Signed-off-by: Nicholas Gates <nick@nickgates.com>
Signed-off-by: Nicholas Gates <nick@nickgates.com>
Signed-off-by: Nicholas Gates <nick@nickgates.com>
Signed-off-by: Nicholas Gates <nick@nickgates.com>
gatesn and others added 19 commits December 8, 2025 12:58
Signed-off-by: Nicholas Gates <nick@nickgates.com>
Signed-off-by: Nicholas Gates <nick@nickgates.com>
Signed-off-by: Nicholas Gates <nick@nickgates.com>
Signed-off-by: Nicholas Gates <nick@nickgates.com>
Signed-off-by: Nicholas Gates <nick@nickgates.com>
Signed-off-by: Nicholas Gates <nick@nickgates.com>
This is a WIP PR to flesh out the code path that uses vector execution
rather than array compute functions.

---------

Signed-off-by: Nicholas Gates <nick@nickgates.com>
Signed-off-by: Nicholas Gates <nick@nickgates.com>
Signed-off-by: Nicholas Gates <nick@nickgates.com>
* Fixes a few bugs
* Adds missing Scalar::from_vector_scalar conversion
* Adds a couple of push-down rules, fixes optimizer to run them bottom
up in the same pass
* Adds filter push-down, albeit without any cost estimates.

---------

Signed-off-by: Nicholas Gates <nick@nickgates.com>
Signed-off-by: Siddharth Kumar <SiddharthKumarGulia@proton.me>
Co-authored-by: Alfonso Subiotto Marqués <alfonso.subiotto@polarsignals.com>
Co-authored-by: Baris Palaska <barispalaska@gmail.com>
Co-authored-by: sherlockbeard <sidkumargulia@gmail.com>
Co-authored-by: Connor Tsui <87130162+connortsui20@users.noreply.github.com>
Signed-off-by: Nicholas Gates <nick@nickgates.com>
Signed-off-by: Nicholas Gates <nick@nickgates.com>
Signed-off-by: Nicholas Gates <nick@nickgates.com>
Signed-off-by: Nicholas Gates <nick@nickgates.com>
Signed-off-by: Nicholas Gates <nick@nickgates.com>
Signed-off-by: Nicholas Gates <nick@nickgates.com>
@codecov
Copy link

codecov bot commented Dec 10, 2025

Codecov Report

❌ Patch coverage is 14.28571% with 72 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.94%. Comparing base (ee7cb6b) to head (494bf29).

Files with missing lines Patch % Lines
encodings/datetime-parts/src/rules.rs 0.00% 27 Missing ⚠️
vortex-array/src/builtins.rs 0.00% 25 Missing ⚠️
vortex-array/src/expr/exprs/pack/rules.rs 30.00% 14 Missing ⚠️
vortex-array/src/arrays/filter/array.rs 0.00% 3 Missing ⚠️
vortex-array/src/session/mod.rs 25.00% 3 Missing ⚠️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Base automatically changed from break/operators to develop December 11, 2025 10:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants