mohamed-elbrik opened a new pull request, #18595:
URL: https://github.com/apache/iceberg/pull/18595
### 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`.
--
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]