[feature] Add write_batch_size to cache_parquet #86
All Vouch review confidence checks passed
Residual risk 0.16 = Change Risk (0.40) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.40 · 309 lines diff across 3 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.343
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #86"
general
weight: 0.35
timkpaine
Description
cache_parquetwrites all missing partitions in one streaming sink, and Polars renames each finished file into place only when the sink ends. A backfill that fails or is killed partway keeps none of its partitions. This addswrite_batch_size, which splits the write into upstream queries of at most that many partitions, so every batch that completes stays in the cache and a rerun fetches only the rest.CacheMode.CACHEwhen the query's partitions can be enumerated and none of its keys is null; other writes are not split.main, so a batch that writes0.0for a query on-0.0does not empty it; the signed-zero regression test now also runs withwrite_batch_size=1.(d1, A)and(d2, B)also wrote(d1, B)and(d2, A)), and it dropped a target with a null date and no extra-column constraint. Both affect unbatched writes too. Periods that target the same extra-column values share one filter term, so the filter stays small for long date ranges.write_batch_size, and the docstring notes how attlwith a fixed cutoff gives aREBUILDthat a rerun can resume.ComputeErrorwith the original message but not its type, so the example catches that.Type of Change
Checklist
make lint-py,make lint-docs)python -m pytest polars_io_tools/tests --ignore=polars_io_tools/tests/integration: 2163 passed with Polars 2.0.0, 2160 with Polars 1.44.1)