UpdateSchema: AddColumn silently discards nested columns added under a parent staged for deletion
- Dominant language
- Go
- Stars
- 463
- Forks
- 232
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 121
Description
### Apache Iceberg version
None
### Please describe the bug 🐞
When a column is deleted and a new nested column is added under that same (now-deleted) parent within the same `UpdateSchema` or `Transaction` chain, `AddColumn` succeeds without error, but `Apply()` / `Commit()` silently drops the newly added column because the parent struct field is removed from the schema before the visitor considers pending additions under it.
What is expected? An error, since the parent is already deleted
### Status
I'm working on this and will be submitting a PR.
Contributor guide
Research direction
Start by tracing AddColumn through the UpdateSchema and Transaction paths into Apply and Commit, focusing on how deleted parent fields and pending nested additions are visited. Add a regression test for deleting a parent and adding a nested column beneath it in the same chain. Done means the operation returns an error instead of silently dropping the addition.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100