Skip to content

feat(python): fail soft on unsupported Polars predicates in to_polars - #10414

Open
robert3005 wants to merge 2 commits into
developfrom
claude/polars-predicate-soft-fail-pfg49n
Open

robert3005 wants to merge 2 commits into
developfrom
claude/polars-predicate-soft-fail-pfg49n

Conversation

@robert3005

Copy link
Copy Markdown
Contributor

Previously any Polars predicate that polars_to_vortex could not convert raised NotImplementedError inside _io_source, failing the whole collect(). Instead, decompose the predicate into its top-level AND conjuncts, push the convertible conjuncts into the Vortex scan, and evaluate the residual conjuncts with Polars on each yielded batch.

Since Polars does not re-apply a predicate handed to an IO source, both parts are always applied, and a row limit is only pushed into the scan when there is no residual filter (otherwise it is enforced after filtering each batch).

@robert3005 robert3005 added the changelog/fix A bug fix label Oct 9, 2026
@codspeed

codspeed Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

Merging this PR will degrade performance by 12.33%

⚠️ Unknown Walltime execution environment detected

Using the Walltime instrument on standard Hosted Runners will lead to inconsistent data.

For the most accurate results, we recommend using CodSpeed Macro Runners: bare-metal machines fine-tuned for performance measurement consistency.

⚠️ 1 benchmark measured no execution time

Nothing ran under measurement, usually because the compiler removed the code under test. This result is not comparable, so it counts as unchanged.

Preventing compiler optimizations

⚠️ 11 benchmarks spent significant time in system calls

System calls cannot be consistently instrumented, so they are not included in the measure, which understates the real cost. Please switch to the Walltime instrument to accurately measure system calls.

Measurement and system calls

❌ 1 regressed benchmark
✅ 2182 untouched benchmarks
⏩ 359 skipped benchmarks1

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
❌ WallTime bitpack_blocked_compress_avx2 6.7 µs 7.7 µs -12.33%

Tip

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


Comparing claude/polars-predicate-soft-fail-pfg49n (147344b) with develop (731a231)

Open in CodSpeed

Footnotes

  1. 359 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. ↩

claude added 2 commits October 9, 2026 21:19
Previously any Polars predicate that polars_to_vortex could not convert
raised NotImplementedError inside _io_source, failing the whole
collect(). Instead, decompose the predicate into its top-level AND
conjuncts, push the convertible conjuncts into the Vortex scan, and
evaluate the residual conjuncts with Polars on each yielded batch.

Since Polars does not re-apply a predicate handed to an IO source, both
parts are always applied, and a row limit is only pushed into the scan
when there is no residual filter (otherwise it is enforced after
filtering each batch).

Signed-off-by: Claude <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01U7dRrRezdUuF8r67wUyQdf
typos splits "ANDed" into "AN" + "Ded" and flags the latter.

Signed-off-by: Claude <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01U7dRrRezdUuF8r67wUyQdf
@robert3005
robert3005 force-pushed the claude/polars-predicate-soft-fail-pfg49n branch from 5bac692 to 147344b Compare October 9, 2026 21:20

This branch has not been deployed

No deployments
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.

2 participants