Skip to content

Expand the Python expression API - #9375

Open
robert3005 wants to merge 1 commit into
developfrom
rk/python-expr-api
Open

Expand the Python expression API#9375
robert3005 wants to merge 1 commit into
developfrom
rk/python-expr-api

Conversation

@robert3005

Copy link
Copy Markdown
Contributor

Expand python expression api to cover all of the expressions in the rust api


Stack created with GitHub Stacks CLIGive Feedback 💬

Expose the rest of the Vortex expression builders to Python: comparisons and
arithmetic as free functions, boolean collection helpers, string predicates,
struct/list operations, conditionals, and `variant_get`. Binary operators now
coerce any scalar-convertible Python value on either side, so `1 < ve.column("a")`
works via the reflected `__r*__` methods.

Expressions also gain `serialize`/`vortex.expr.deserialize` and `__reduce__`,
backed by the protobuf wire format, so they can cross a process boundary.
`ByteLength`, `Mask` and `Zip` implemented serialization but were missing from
`ScalarFnSession::default()`, so they serialized and then failed to deserialize
with "unknown expression id"; register them and cover the round trip.

Signed-off-by: Robert Kruszewski <github@robertk.io>
@robert3005 robert3005 added the changelog/feature A new feature label Aug 12, 2026
@codspeed-hq

codspeed-hq Bot commented Aug 12, 2026

Copy link
Copy Markdown

Merging this PR will degrade performance by 5.65%

⚡ 2 improved benchmarks
❌ 3 regressed benchmarks
✅ 1957 untouched benchmarks
⏩ 89 skipped benchmarks1

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
Simulation decompress[u64, (10000, 4)] 310.8 µs 402.7 µs -22.82%
Simulation decompress[u64, (1000, 16)] 64.2 µs 73 µs -12.07%
Simulation take[small_m/shuffled/primitive/nonnull/chunks=16384/indices=16] 1.1 ms 1.2 ms -11.64%
Simulation slice_primitive_tight_loop[10000] 473.9 µs 423.8 µs +11.81%
Simulation slice_dict_tight_loop[10000] 770.3 µs 690.9 µs +11.5%

Tip

Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.


Comparing rk/python-expr-api (9871191) with develop (d4b5d24)

Open in CodSpeed

Footnotes

  1. 89 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

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.

1 participant