Skip to content

format_table: fix writes when partition columns are reordered - #1111

Merged
JingsongLi merged 1 commit into
apache:mainfrom
shyjsarah:fix/format-table-partition-order
Oct 12, 2026
Merged

JingsongLi merged 1 commit into
apache:mainfrom
shyjsarah:fix/format-table-partition-order

Conversation

@shyjsarah

Copy link
Copy Markdown
Contributor

Summary

Fix Format Table writes when a partition column is not the first field in the table schema. The writer previously combined full-schema column indices with partition-only field metadata, which could panic with an out-of-bounds access.

Changes

  • use full table schema metadata when extracting partition values from Arrow batches
  • add a REST catalog regression test with the partition column at the end of the schema
  • keep the change internal; there is no public API change

Testing

  • cargo test -p paimon-datafusion --test rest_format_table_dml
  • cargo clippy -p paimon-datafusion --test rest_format_table_dml -- -D warnings
  • cargo fmt --all -- --check

@JingsongLi JingsongLi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

+1

@JingsongLi
JingsongLi merged commit 1ab7460 into apache:main Oct 12, 2026
16 checks 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.

2 participants