Skip to content

test(ingest): pre-create partitions for the fixed batch date range#26

Merged
taran-dbx merged 1 commit into
mainfrom
fix/test-ingest-partitions
Jun 1, 2026
Merged

test(ingest): pre-create partitions for the fixed batch date range#26
taran-dbx merged 1 commit into
mainfrom
fix/test-ingest-partitions

Conversation

@taran-dbx
Copy link
Copy Markdown
Collaborator

Summary

tests/test_ingest.sql inserts batch rows hardcoded to 2026-03-25 via ingest_batch, but create_chronotable only pre-creates partitions around the setup row's now(), and LakeTS does not auto-create partitions on insert. Once the wall clock moved past March 2026 the batch INSERTs began failing with no partition of relation "ing_test" found for row.

Fix: explicitly _ensure_partitions over the fixed batch date range (2026-03-24 → 2026-03-27) right after create_chronotable. Deterministic — the batch timestamps are fixed, so the pre-created partitions always cover them regardless of the current date.

Pre-existing issue, unrelated to any feature change.

Test plan

  • tests/test_ingest.sql — all 7 cases pass (T1 inserted 3, T4 queryable, T5 NULL, T6 empty, T7 numeric)

test_ingest seeds rows dated 2026-03-25 via ingest_batch, but
create_chronotable only pre-creates partitions around the setup row's
now(), and LakeTS does not auto-create partitions on insert -- so the
batch INSERTs failed with 'no partition found' once the wall clock moved
past March 2026. Explicitly ensure partitions covering the batch range.
@github-actions github-actions Bot added the tests label Jun 1, 2026
@taran-dbx taran-dbx merged commit 7d24309 into main Jun 1, 2026
10 checks passed
@taran-dbx taran-dbx deleted the fix/test-ingest-partitions branch June 1, 2026 13:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant