Skip to content

fix(python): support unsigned Polars scalar literals - #10170

Merged
robert3005 merged 3 commits into
developfrom
dk/polars-predicate-pushdown
Oct 8, 2026
Merged

robert3005 merged 3 commits into
developfrom
dk/polars-predicate-pushdown

Conversation

@danking

@danking danking commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Polars predicate pushdown can serialize unsigned comparison literals as typed scalar variants that the converter rejects. Decode recognized scalar variants through the existing literal type mapping, including UInt8, UInt16, UInt32, and UInt64.

Add file-scan regression cases for comparisons on all four unsigned widths. Split from the original combined PR; datetime changes are in #10183 (stacked on #10182), and is_not_null changes are in #10184.

Validation: 4 targeted regression case(s) passed with this PR’s converter. With only polars_.py restored to the base revision and the same tests retained, all 4 failed with Polars ComputeError wrapping the unsupported-expression ValueError or NotImplementedError. The tests compare complete dataframes from Polars alone and a Vortex-backed Polars scan, and check explicit row expectations. No lint or broader suite was run.

Comment thread vortex-python/python/vortex/polars_.py Outdated
@danking danking added the changelog/fix A bug fix label Oct 1, 2026
@danking
danking force-pushed the dk/polars-predicate-pushdown branch from bd883a7 to f8b4255 Compare October 1, 2026 16:05
@danking danking changed the title fix(python): support unsigned, datetime, and non-null Polars predicates fix(python): support unsigned Polars scalar literals Oct 1, 2026
danking and others added 3 commits October 8, 2026 22:13
Signed-off-by: Daniel King <dan@spiraldb.com>
Signed-off-by: Daniel King <dan@spiraldb.com>
Signed-off-by: Claude <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E92wUoS3LaqWVJmmS7vKVq
@robert3005
robert3005 force-pushed the dk/polars-predicate-pushdown branch from 4d23c19 to 092e50d Compare October 8, 2026 22:14
@robert3005
robert3005 enabled auto-merge (squash) October 8, 2026 22:15
@codspeed

codspeed Bot commented Oct 8, 2026

Copy link
Copy Markdown

Merging this PR will improve performance by 12.86%

⚠️ 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 improved benchmark
✅ 2174 untouched benchmarks
⏩ 534 skipped benchmarks1

Performance Changes

Mode Benchmark BASE HEAD Efficiency
⚡ WallTime bitpack_blocked_compress_avx2 7.6 µs 6.7 µs +12.86%

Tip

Curious why performance improved? Comment @codspeedbot explain why performance improved on this PR, or directly use the CodSpeed MCP with your agent.


Comparing dk/polars-predicate-pushdown (092e50d) with develop (c93ffa3)2

Open in CodSpeed

Footnotes

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

  2. No successful run was found on develop (293d4f7) during the generation of this report, so c93ffa3 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report. ↩

@robert3005
robert3005 merged commit 06377e3 into develop Oct 8, 2026
87 checks passed
@robert3005
robert3005 deleted the dk/polars-predicate-pushdown branch October 8, 2026 22:31
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.

4 participants