Skip to content

Limit INSERT field-aware casts to Arrow extensions - #71

Merged
osipovartem merged 1 commit into
embucket-sync-df55.0.0from
df55-limit-insert-field-casts
Sep 6, 2026
Merged

Limit INSERT field-aware casts to Arrow extensions#71
osipovartem merged 1 commit into
embucket-sync-df55.0.0from
df55-limit-insert-field-casts

Conversation

@osipovartem

Copy link
Copy Markdown
Collaborator

Summary

  • preserve target field metadata during INSERT only for Arrow extension fields
  • avoid promising arbitrary nested metadata that Arrow casts do not materialize
  • add regression coverage for Iceberg-style PARQUET:field_id list metadata
  • retain coverage for same-storage and storage-converting extension casts

Why

The previous field-aware INSERT coercion applied to all field metadata. For nested Iceberg list fields this made the logical projection schema exactly match the target schema, while the runtime Arrow cast still produced a list array without the nested metadata. Rustice then failed to construct a RecordBatch before its metadata repair rule could run.

Validation

  • cargo +1.97.0 test -p datafusion-sql --lib --tests (92 unit, 590 integration)
  • cargo +1.97.0 clippy -p datafusion-sql --all-targets --all-features -- -D warnings
  • cargo +1.97.0 fmt --all -- --check

The equivalent follow-up is also pushed to apache#24971.

@osipovartem
osipovartem merged commit 6e224e3 into embucket-sync-df55.0.0 Sep 6, 2026
19 checks passed
@github-actions github-actions Bot added the sql label Sep 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant