Skip to content

fix(python): translate Polars binary scalar literals - #10188

Merged
robert3005 merged 1 commit into
developfrom
dk/polars-binary-literals
Oct 8, 2026
Merged

robert3005 merged 1 commit into
developfrom
dk/polars-binary-literals

Conversation

@danking

@danking danking commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Polars serializes binary scalar literals as integer byte arrays. Decode those bytes and create a native Vortex binary literal; passing the JSON integer list as the literal value is incorrect.

This is a direct expression translation; it performs no eager evaluation and does not require literal arguments. Literal-specific PRs decode the scalar representation itself.

Validation: 1 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 1 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.

@danking danking added the changelog/fix A bug fix label Oct 1, 2026
@danking
danking marked this pull request as ready for review October 1, 2026 17:59
@robert3005
robert3005 force-pushed the dk/polars-binary-literals branch from 027ea41 to 200e872 Compare October 8, 2026 20:43
@robert3005
robert3005 enabled auto-merge (squash) October 8, 2026 22:14
Signed-off-by: Daniel King <dan@spiraldb.com>
@robert3005
robert3005 force-pushed the dk/polars-binary-literals branch from 200e872 to d6cf0f4 Compare October 8, 2026 23:05
@codspeed

codspeed Bot commented Oct 8, 2026

Copy link
Copy Markdown

Merging this PR will degrade performance by 10.6%

⚠️ 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

❌ 1 regressed benchmark
✅ 2174 untouched benchmarks
⏩ 534 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.8 µs 7.6 µs -10.6%
⚠️ Simulation bench_compare_primitive[(10000, 2)] < 1 ns < 1 ns N/A

Tip

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


Comparing dk/polars-binary-literals (d6cf0f4) with develop (9593b60)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 (fdfe7f4) during the generation of this report, so 9593b60 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report. ↩

@robert3005
robert3005 merged commit 4ba858a into develop Oct 8, 2026
85 of 87 checks passed
@robert3005
robert3005 deleted the dk/polars-binary-literals branch October 8, 2026 23:21
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