Skip to content

fix(plan): say batch windows as a count of days, hours or minutes - #386

Merged
kvlonge merged 2 commits into
mainfrom
fix/plan-window-length
Nov 29, 2026
Merged

kvlonge merged 2 commits into
mainfrom
fix/plan-window-length

Conversation

@kvlonge

@kvlonge kvlonge commented Nov 29, 2026

Copy link
Copy Markdown
Contributor

plan -v printed a day batch_size as "11 windows of 7days". The commits line now reads "11 windows of 7 days", "1 window of 1 day" or "4 windows of 6 hours", using the same rounding to days, hours or minutes as the short "7-day" form. An integer batch_size is unchanged ("4 windows of 50000").

The refusal of a files merge (or delete_insert by replace_key) into another target drops "so far" and names every target that takes it: "merge from a files source loads only into DuckDB, MotherDuck and Postgres targets, not Snowflake; use append, or delete_insert on a partition cursor". MotherDuck uses the DuckDB adapter, so it was already allowed.

  • A new render test in loader/tests/test_plan_lines.rs covers 7-day, 1-day, 6-hour and integer windows. It fails on the old code ("7days") and passes with the fix.
  • The integration tests and the two docs captures that quote either line are updated.
  • Checked locally: cargo test -p sqlload --lib -- loader::tests::plan_lines and cargo fmt --check.

plan -v printed a seven-day batch_size as "11 windows of 7days". The
commits line now says "11 windows of 7 days", "1 window of 1 day" or
"4 windows of 6 hours", as the shorter commits line already said
"7-day".

The refusal of a files merge into another target names the targets it
loads into, DuckDB, MotherDuck and Postgres, without history wording.
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 29, 2026 •

Copy link
Copy Markdown

Deploying sqlload with  Cloudflare Pages  Cloudflare Pages

Latest commit: 1ce958d
Status: ✅  Deploy successful!
Preview URL: https://80e47461.sqlload.pages.dev
Branch Preview URL: https://fix-plan-window-length.sqlload.pages.dev

View logs

render.rs passed the 2,000-line limit. window_length and window_span go to
time_text, beside the other time wording plan uses.
@kvlonge
kvlonge merged commit 514ed37 into main Nov 29, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant