Yibo-Dong opened a new issue, #19305:
URL: https://github.com/apache/iceberg/issues/19305

   ### Apache Iceberg version
   
   main (development)
   
   ### Query engine
   
   Spark
   
   ### Please describe the bug 🐞
   
   Dropping the last field of a struct column is accepted, but afterwards every 
Parquet write to the table fails, even when the struct value is NULL. The same 
happens for a struct inside a list or a map. Avro writes work. The open 
read-side fixes #19153 / #19157 do not cover this. Reproduced on `main` 
(3bfa3e4, 2026-12-01) and 1.12.0, Spark 3.5.5.
   
   ### Reproduction
   
   ```sql
   CREATE TABLE local.db.t (id INT, s STRUCT<a:INT, b:INT>) USING iceberg;
   ALTER TABLE local.db.t DROP COLUMN s.a;
   INSERT INTO local.db.t VALUES (1, NULL);
   ALTER TABLE local.db.t DROP COLUMN s.b;
   INSERT INTO local.db.t VALUES (2, NULL);
   SELECT id FROM local.db.t ORDER BY id;
   ```
   
   ### Expected
   
   | Query | Result |
   |---|---|
   | second `INSERT` | succeeds |
   | `SELECT id` | `1`, `2` |
   
   ### Actual
   
   | Query | Result |
   |---|---|
   | second `INSERT` | `InvalidSchemaException: Cannot write a schema with an 
empty group: optional group s = 2 { }` |
   | `SELECT id` | `1` |
   
   
   ### 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
   - [x] 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]

  • [I] Parquet: table cannot be w... Yibo-Dong (via GitHub) via issues

Reply via email to