Skip to content

fix: keep SQLite loader and source timestamps as text and add a waffle shop E2E - #1154

Merged
kvlonge merged 3 commits into
mainfrom
test/sqlite-waffle-shop
Oct 19, 2026
Merged

kvlonge merged 3 commits into
mainfrom
test/sqlite-waffle-shop

Conversation

@kvlonge

@kvlonge kvlonge commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

Why

Running the waffle shop project on SQLite showed that SQLite's CAST(x AS TIMESTAMP) and AS DATE keep only the leading number: loader timestamps were stored as 2026, declared date/time source columns read the same way, and copied untyped columns gained a BLOB type that the next build reported as a type change.

Changes

  • Loader rows are written uncast, with declared or inferred column types handed to the staging table the same way model builds do; Python datetimes are stored as canonical UTC text.
  • SQLite date/time source, contract and retype casts keep the stored text.
  • Untyped columns stay untyped when a table is copied.
  • New waffle shop build/test/rebuild E2E on SQLite with row counts matched against DuckDB; SQLite docs note the timestamp behaviour.

Verification

  • Waffle shop, loader and adapter integration tests fail without the fix and pass with it.
  • SQLite E2E and integration suites, loader unit tests, fensu, ruff, ty.

…affle shop E2E

SQLite's CAST to a date or time type keeps only the leading number, so
loader rows and declared TIMESTAMP/DATE source columns were stored and read
as 2026. Loader rows are now written uncast with their types declared on the
staging table, Python datetimes are written as canonical UTC text, and
date/time source, contract and retype casts keep the stored text. Tables
copied from untyped columns no longer gain a BLOB type that later reads as a
type change.

Adds a waffle shop build, test and rebuild E2E on SQLite whose row counts
match a DuckDB run, plus focused loader and adapter tests.
@kvlonge
kvlonge enabled auto-merge (squash) October 19, 2026 08:19
@kvlonge
kvlonge merged commit f5b655e into main Oct 19, 2026
28 checks passed
@kvlonge
kvlonge deleted the test/sqlite-waffle-shop branch October 19, 2026 09:08
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