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

   ### Apache Iceberg version
   
   main (development)
   
   ### Query engine
   
   Spark
   
   ### Please describe the bug 🐞
   
   `ADD PARTITION FIELD ... AS K` and `ADD PARTITION FIELD ... AS k` are both 
accepted. After that, every query on the table fails with Spark's default 
case-insensitive resolution. Reproduced on `main` (3bfa3e4, 2026-12-01) and 
1.12.0, Spark 3.5.5.
   
   ### Reproduction
   
   ```sql
   CREATE TABLE local.db.t (id INT, v STRING) USING iceberg;
   -- partition field names that differ only in case are both accepted
   ALTER TABLE local.db.t ADD PARTITION FIELD id AS K;
   ALTER TABLE local.db.t ADD PARTITION FIELD v AS k;
   INSERT INTO local.db.t VALUES (1, 'x');
   SELECT 'default', * FROM local.db.t;
   
   -- control: the same read with case-sensitive resolution
   SET spark.sql.caseSensitive=true;
   SELECT 'case-sensitive', * FROM local.db.t;
   ```
   
   ### Expected
   
   | Query | Result |
   |---|---|
   | second `ADD PARTITION FIELD` | rejected (duplicate name), or the table 
stays readable |
   | `default` | `1 x` |
   | `case-sensitive` (control) | `1 x` |
   
   ### Actual
   
   | Query | Result |
   |---|---|
   | second `ADD PARTITION FIELD` | succeeds |
   | `default` | `IllegalArgumentException: Cannot build lower case index: 
partition.K and partition.k collide` |
   | `case-sensitive` (control) | `1 x` |
   
   ### 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]

Reply via email to