Skip to content

chore(registry): track ibis-sqlite NaT memtable-binding bug (IB-DT-19) - #302

Merged
discreteds merged 1 commit into
developfrom
chore/upstream-issue-ib-dt-10-sqlite-nat-binding
Aug 19, 2026
Merged

chore(registry): track ibis-sqlite NaT memtable-binding bug (IB-DT-19)#302
discreteds merged 1 commit into
developfrom
chore/upstream-issue-ib-dt-10-sqlite-nat-binding

Conversation

@discreteds

@discreteds discreteds commented Aug 18, 2026

Copy link
Copy Markdown
Member

Summary

Registers a new needs_filing entry (IB-DT-19) in registry/upstream-issues.yaml for an ibis-sqlite bug discovered downstream while investigating mountainash-data DEBT-13 (a.backlog/2026-08-18-sqlite-null-temporal-binding.md in mountainash-central).

ibis.backends.sqlite.Backend._register_in_memory_table stages memtables via op.data.to_frame() — a pandas roundtrip. A null date32/timestamp value becomes pandas NaT, which sqlite3 cannot bind. Crashes create_table/insert for any frame containing a null temporal value.

Verified empirically 2026-08-18 against ibis 12.0.0:

  • Raw pyarrow.Table sources are incidentally safe for date columns only (PyArrow's Table.to_pandas() defaults date_as_object=True), not for timestamp columns.
  • polars/pandas DataFrame sources crash for both date and timestamp columns.

No existing upstream ibis issue covers this (checked #8302, #9669, #1159 — all unrelated). status: needs_filing, zero-ref-OK per the registry's join contract (no code-side CapabilityFact/DivergenceFact yet — this wasn't found via mountainash's own cross-backend probe suite).

Note: the natural next id (IB-DT-10) collided with an existing DivergenceFact id in core/capabilities/divergences.py (unrelated topic — datetime offset engine-leniency), caught by test_no_divergence_id_collides_with_an_unrelated_yaml_entry. Used the next free id in both namespaces, IB-DT-19.

Verification

  • hatch run test:python scripts/validate_upstream_registry.py — Validation PASSED, 127 entries, 0 errors
  • hatch run test:pytest tests/core/test_upstream_registry_join.py — 5 passed

No code changes, no fix implemented yet — this is registry tracking only, per decision to hold off filing the public ibis-project issue.

_register_in_memory_table stages sqlite memtables via a pandas roundtrip
(op.data.to_frame()); null date32/timestamp values become pandas NaT,
which sqlite3 cannot bind. Crashes create_table/insert for any frame
with a null temporal value. Discovered downstream in mountainash-data
(DEBT-13). status: needs_filing, zero-ref-OK per the join contract —
no upstream ibis issue exists yet.
@discreteds
discreteds merged commit 4114570 into develop Aug 19, 2026
discreteds added a commit that referenced this pull request Aug 19, 2026
…303) (#304)

PR #302 (adding this entry) and PR #303 (shipping the fix) merged in the
opposite order (303 landed first), leaving our_workaround: none stale on
develop even though ensure_sqlite_nat_adapter() already shipped in the same
history. Update our_workaround to fallback_impl and document the shim,
its call sites, the rejected alternatives, and the xfail(strict=True)
upstream-fix monitor that will flag when ibis fixes this natively.

Verified: scripts/validate_upstream_registry.py passes (127 entries, 0
errors); tests/core/test_upstream_registry_join.py and
tests/scripts/test_validate_upstream_registry.py pass (25 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