mohamed-elbrik opened a new issue, #18596:
URL: https://github.com/apache/iceberg/issues/18596

   ### Apache Iceberg version
   
   1.12.0 (latest release)
   
   ### Query engine
   
   None
   
   ### Please describe the bug 🐞
   
   ### Problem
   `IcebergSinkConfig.stringToList()` previously only checked for `value == 
null || value.isEmpty()`. When provided with whitespace-only strings, 
consecutive delimiters (e.g., `col1, , col2`), or trailing commas (e.g., `col1, 
`), it retained empty string elements (`""`). This caused downstream operations 
like `table.schema().findField("")` or the `PartitionSpec` builder to fail 
unexpectedly with `IllegalArgumentException: ID column not found:` or 
unsupported transforms. Additionally, the `testStringWithParensToList` method 
was left unimplemented.
   
   ### Solution
   - Add whitespace check (`value.trim().isEmpty()`) in 
`IcebergSinkConfig.stringToList()`.
   - Filter out empty elements (`.filter(s -> !s.isEmpty())`) after trimming 
individual items.
   - Implement comprehensive test cases including whitespace and empty element 
handling in `testStringToList` and `testStringWithParensToList`.
   
   ### Willingness to contribute
   
   - [x] 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]

Reply via email to