Skip to content

fix: DATE/DATETIME OOB on rows past inference sample (Issue #232) - #242

Merged
vmvarela merged 1 commit into
masterfrom
fix/date-oob-232
Sep 12, 2026
Merged

vmvarela merged 1 commit into
masterfrom
fix/date-oob-232

Conversation

@vmvarela

Copy link
Copy Markdown
Owner

Closes #232.

What: re-validación en bind-time en insertRowTyped — valor no conforme tras la muestra de 100 filas se bindea como TEXT, nunca panic.

  • src/loader.zig: helpers dateMatchesType/dateTimeMatchesType (genérico isDate/isDateTime + separador y largo por variante); fallback TEXT igual que INTEGER/REAL.
  • Solo loader CSV/TSV afectado; resto de loaders sin bind tipado de fecha.

Test:

  • Repro issue (100× fecha + x) → count 101 exit 0, x como TEXT; variante cruzada y datetime cross-length OK.
  • 2 unit tests nuevos; zig build unit-test y zig build test exit 0.

@github-actions github-actions Bot added the type:bug Something isn't working label Sep 12, 2026
@vmvarela
vmvarela merged commit 61306cc into master Sep 12, 2026
5 checks passed
@vmvarela
vmvarela deleted the fix/date-oob-232 branch September 12, 2026 09:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type:bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] DATE/DATETIME out-of-bounds read on rows past the inference sample

1 participant