Skip to content

Fix crash on unparseable timestamps in stats JSON#12

Closed
VLCDaniel wants to merge 2 commits intomainfrom
fix-timestamp-stats-parse
Closed

Fix crash on unparseable timestamps in stats JSON#12
VLCDaniel wants to merge 2 commits intomainfrom
fix-timestamp-stats-parse

Conversation

@VLCDaniel
Copy link
Copy Markdown
Collaborator

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 7, 2026

ACTION NEEDED

delta-rs follows the Conventional Commits specification for release automation.

The PR title and description are used as the merge commit message. Please update your PR title and description to match the specification.

@VLCDaniel VLCDaniel changed the title [HSTACK] - fix crash on unparseable timestamps in stats JSON Fix crash on unparseable timestamps in stats JSON Apr 7, 2026
@VLCDaniel VLCDaniel force-pushed the fix-timestamp-stats-parse branch from 237022a to d999da1 Compare April 7, 2026 11:36
// silently widen the column (e.g. Int32 → Utf8), and
// (b) incompatible assignments (e.g. a non-numeric string into an Int32
// column) are caught during plan optimisation via constant folding.
let typed_expr = cast(expr.to_owned(), field.data_type().clone());
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DataFusion silently coerces incompatible types in CASE expressions (e.g. promoting Int32 to Utf8 when a string expression is assigned to an integer column) instead of erroring. Without an explicit check, a type-mismatched update would succeed and write a parquet file with the wrong column type

test_expected_failures exposed this, this is how it fails now:

  Optimizer rule 'simplify_expressions' failed
  caused by
  Arrow error: Cast error: Cannot cast string 'a string' to value of Int32 type

@VLCDaniel VLCDaniel closed this Apr 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant