Yibo-Dong opened a new issue, #19192: URL: https://github.com/apache/iceberg/issues/19192
### Apache Iceberg version 1.12.0 (latest release) ### Query engine Spark ### Please describe the bug 🐞 Selecting only some of `_change_type`, `_change_ordinal` and `_commit_snapshot_id` from a `changes` table, or one of them together with a metadata column, returns values in the wrong columns or fails with a `ClassCastException`. Reproduced on `main` (9d4f6c7, 2026-11-28) and 1.12.0, Spark 3.5.5. ### Reproduction ```sql CREATE TABLE local.db.t (id INT, data STRING) USING iceberg; INSERT INTO local.db.t VALUES (1, 'a'); -- control: all three changelog columns SELECT 'all', id, _change_type, _change_ordinal, _commit_snapshot_id FROM local.db.t.changes; SELECT 'with _file', id, _change_type, substring_index(_file, '/', -1) FROM local.db.t.changes; SELECT 'one column', id, _commit_snapshot_id FROM local.db.t.changes; ``` ### Expected | Query | Result | |---|---| | `all` (control) | `1 INSERT 0 <snapshot id>` | | `with _file` | `1 INSERT 00000-0-...parquet` | | `one column` | `1 <snapshot id>` | ### Actual | Query | Result | |---|---| | `all` (control) | same | | `with _file` | `1 file:/.../00000-0-...parquet INSERT` | | `one column` | `ClassCastException: UTF8String cannot be cast to Long` | ### Willingness to contribute - [ ] I can contribute a fix for this bug independently - [ ] I would be willing to contribute a fix for this bug with guidance from the Iceberg community - [ ] I cannot contribute a fix for this bug at this 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
