perf(table): make localized Polars exports native-speed - #10674
Merged
kirangadhave merged 4 commits intoAug 27, 2026
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
|
All contributors have signed the CLA ✍️ ✅ |
Contributor
There was a problem hiding this comment.
All reported issues were addressed across 10 files
You’re at about 95% of the monthly reviewed-line limit. You may want to disable incremental reviews to conserve quota. Reviews will continue until that limit is exceeded. If you need help avoiding interruptions, please contact contact@cubic.dev.
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
Light2Dark
marked this pull request as ready for review
August 27, 2026 18:00
kirangadhave
merged commit Aug 27, 2026
ef964c5
into
kg/mo-7455-locale-table-export
51 of 56 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request was authored by a coding agent.
📝 Summary
This is a stacked follow-up to #10661 and targets its feature branch. The parent PR makes CSV and TSV exports locale-aware, but non-default dialects route dataframe rows through Python's
csv.writer. That cost is especially visible for Polars, whose native writer is otherwise implemented in Rust.This PR keeps pandas and Polars on their native CSV writers for ordinary numeric and text data with the common
.and,decimal separators. pandas prepares only values that its nativedecimaloption does not format. Polars falls back to the shared compatibility writer when native output would change established export text.Complexity and compatibility tradeoff
The adapter-specific fallbacks are intentional:
٫use the shared compatibility writer.nan.The ordinary path still performs one native dataframe serialization. pandas does not materialize or inspect its index unless the index is included in the export. The redundant
download_as(locale=...)path and the private Narwhalsseparator/dialectdual interface were removed to offset the compatibility branches and leave one locale and dialect flow.Benchmark
Local microbenchmark on Apple Silicon with 200,000 rows and five columns. Each case had one warm-up serialization followed by one timed serialization, using the same environment for the parent PR and this branch.
The repository does not have a Python benchmark harness, so unit tests avoid flaky wall-clock assertions. Deterministic routing tests verify the native writer paths, while exact-output tests cover NaN-bearing floats, numeric indexes, temporal values, binary values, nested data, Unicode decimal separators, and older-Polars capability detection.
📋 Pre-Review Checklist
✅ Merge Checklist