test(ingest): pre-create partitions for the fixed batch date range#26
Merged
Conversation
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.
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.
Summary
tests/test_ingest.sqlinserts batch rows hardcoded to2026-03-25viaingest_batch, butcreate_chronotableonly pre-creates partitions around the setup row'snow(), and LakeTS does not auto-create partitions on insert. Once the wall clock moved past March 2026 the batch INSERTs began failing withno partition of relation "ing_test" found for row.Fix: explicitly
_ensure_partitionsover the fixed batch date range (2026-03-24 → 2026-03-27) right aftercreate_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)