You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "Sanjays2402 (via GitHub)" <gi...@apache.org> on 2026/07/19 07:06:38 UTC
[PR] Resolve staged renames when moving columns in UpdateSchema [iceberg-python]
Sanjays2402 opened a new pull request, #3687:
URL: https://github.com/apache/iceberg-python/pull/3687
Closes #2599.
## What
`rename_column` stages the new column name in `self._updates`, but `move_first`/`move_before`/`move_after` resolved the target column via `self._schema.find_field(...)` against the **original** schema. Moving a column by its **new** name within the same update context therefore raised `ValueError: Cannot move missing column`.
## Reproduction
```python
with tbl.update_schema() as update:
update.rename_column("some_column", "renamed_column")
update.move_first("renamed_column") # ValueError: Cannot move missing column: renamed_column
```
The reporter hit this via AWS Glue, but it reproduces fully in-memory with `InMemoryCatalog` — it is not Glue-specific.
## Fix
`_find_for_move` now checks staged renames in `self._updates` first (respecting `_case_sensitive`) before falling back to the original schema, matching the Java implementation which resolves staged renames.
## Tests
Added `tests/table/test_update_schema.py` covering rename-then-move by new name for `move_first`, `move_before`, and `move_after`. Without the fix all 3 fail with `ValueError: Cannot move missing column`; with the fix all 3 pass. `ruff check` and `ruff format --check` clean.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] Resolve staged renames when moving columns in UpdateSchema [iceberg-python]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #3687:
URL: https://github.com/apache/iceberg-python/pull/3687#issuecomment-5418771003
This pull request has been closed due to lack of activity. This is not a judgement on the merit of the PR in any way. It is just a way of keeping the PR queue manageable. If you think that is incorrect, or the pull request requires review, you can revive the PR at any time.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] Resolve staged renames when moving columns in UpdateSchema [iceberg-python]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #3687:
URL: https://github.com/apache/iceberg-python/pull/3687#issuecomment-5335851098
This pull request has been marked as stale due to 30 days of inactivity. It will be closed in 1 week if no further activity occurs. If you think that's incorrect or this pull request requires a review, please simply write any comment. If closed, you can revive the PR at any time and @mention a reviewer or discuss it on the dev@iceberg.apache.org list. Thank you for your contributions.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] Resolve staged renames when moving columns in UpdateSchema [iceberg-python]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed pull request #3687: Resolve staged renames when moving columns in UpdateSchema
URL: https://github.com/apache/iceberg-python/pull/3687
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org