Skip to content

Core: Fix failure when finding a column during time travel - #14438

Merged
pvary merged 1 commit into
apache:mainfrom
ebyhr:ebi/timetravel-failure
Oct 29, 2025
Merged

pvary merged 1 commit into
apache:mainfrom
ebyhr:ebi/timetravel-failure

Conversation

@ebyhr

@ebyhr ebyhr commented Oct 29, 2025

Copy link
Copy Markdown
Member

#13301 broke an existing test about time-travel with new partition columns in Trino Iceberg connector.

We should fix the regression before releasing 1.11.0.

.newScan()
.useSnapshot(firstSnapshotId)
.filter(Expressions.equal("part", "one"))
.planFiles());

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

The planFiles() fails with the below exception without this PR's change:

Cannot find source column for partition field: 1001: hour: identity(4)
org.apache.iceberg.exceptions.ValidationException: Cannot find source column for partition field: 1001: hour: identity(4)
	at org.apache.iceberg.exceptions.ValidationException.check(ValidationException.java:49)
	at org.apache.iceberg.PartitionSpec.checkCompatibility(PartitionSpec.java:656)
	at org.apache.iceberg.PartitionSpec$Builder.build(PartitionSpec.java:628)
	at org.apache.iceberg.PartitionSpec$Builder.build(PartitionSpec.java:623)
	at org.apache.iceberg.UnboundPartitionSpec.bind(UnboundPartitionSpec.java:46)
	at org.apache.iceberg.SnapshotScan.specs(SnapshotScan.java:98)
	at org.apache.iceberg.DataTableScan.doPlanFiles(DataTableScan.java:77)
	at org.apache.iceberg.SnapshotScan.planFiles(SnapshotScan.java:161)

@singhpk234 singhpk234 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.

LGTM, thanks @ebyhr !

binding with ignore missing fields make senes to me, It would be really nice to add column drop case too.

@pvary
pvary merged commit 92ae3d9 into apache:main Oct 29, 2025
42 checks passed
@pvary

pvary commented Oct 29, 2025

Copy link
Copy Markdown
Contributor

Merged to main.
Thanks @ebyhr for the fix and @singhpk234 for the review!

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.

3 participants