You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "zhan7236 (via GitHub)" <gi...@apache.org> on 2025/11/29 08:26:51 UTC

[PR] Kafka Connect: Improve error logging for invalid partition spec [iceberg]

zhan7236 opened a new pull request, #14714:
URL: https://github.com/apache/iceberg/pull/14714

   Closes #14644
   
   ### What changes were proposed in this pull request?
   
   This PR improves the error logging in `IcebergWriterFactory` when partition spec creation fails due to an invalid configuration.
   
   ### Changes made:
   
   1. **Enhanced error log message**: The log message now explicitly includes the exception message via `e.getMessage()` in the format string, making it clearer what went wrong:
      ```java
      LOG.error(
          "Unable to create partition spec {} for table {}, table will be unpartitioned: {}",
          partitionBy,
          identifier,
          e.getMessage(),
          e);
      ```
   
   2. **Added test case**: Added `testAutoCreateTableWithInvalidPartitionSpec` to verify that when a partition spec is invalid (e.g., referencing a non-existent column), the table is correctly created as unpartitioned.
   
   ### Why are the changes needed?
   
   The original implementation had an ambiguous logging pattern where the exception was passed as the last argument, but it wasn't immediately clear from reading the code that the exception would be properly logged. By explicitly including `e.getMessage()` in the format string, the intent is clearer and ensures the exception message is always visible in the log output regardless of the SLF4J implementation or version.
   
   ### How was this patch tested?
   
   - Existing tests pass.
   - Added new test `testAutoCreateTableWithInvalidPartitionSpec` to verify the fallback behavior when partition spec creation fails.
   - Ran `./gradlew :iceberg-kafka-connect:iceberg-kafka-connect:check` - all checks pass.


-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [PR] Kafka Connect: Improve error logging for invalid partition spec [iceberg]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed pull request #14714: Kafka Connect: Improve error logging for invalid partition spec
URL: https://github.com/apache/iceberg/pull/14714


-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [PR] Kafka Connect: Improve error logging for invalid partition spec [iceberg]

Posted by "zhan7236 (via GitHub)" <gi...@apache.org>.
zhan7236 commented on PR #14714:
URL: https://github.com/apache/iceberg/pull/14714#issuecomment-3697952772

   Just bumping to keep this open. The changes are still relevant and ready for review. Thanks!


-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [PR] Kafka Connect: Improve error logging for invalid partition spec [iceberg]

Posted by "zhan7236 (via GitHub)" <gi...@apache.org>.
zhan7236 commented on PR #14714:
URL: https://github.com/apache/iceberg/pull/14714#issuecomment-3821150070

   Just bumping to keep this open. The changes are still relevant and ready for review. Thanks!


-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [PR] Kafka Connect: Improve error logging for invalid partition spec [iceberg]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #14714:
URL: https://github.com/apache/iceberg/pull/14714#issuecomment-4020365773

   This pull request has been closed due to lack of activity. This is not a judgement on the merit of the PR in any way. It is just a way of keeping the PR queue manageable. If you think that is incorrect, or the pull request requires review, you can revive the PR at any 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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [PR] Kafka Connect: Improve error logging for invalid partition spec [iceberg]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #14714:
URL: https://github.com/apache/iceberg/pull/14714#issuecomment-3821093019

   This pull request has been marked as stale due to 30 days of inactivity. It will be closed in 1 week if no further activity occurs. If you think that’s incorrect or this pull request requires a review, please simply write any comment. If closed, you can revive the PR at any time and @mention a reviewer or discuss it on the dev@iceberg.apache.org list. Thank you for your contributions.


-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [PR] Kafka Connect: Improve error logging for invalid partition spec [iceberg]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #14714:
URL: https://github.com/apache/iceberg/pull/14714#issuecomment-3981394412

   This pull request has been marked as stale due to 30 days of inactivity. It will be closed in 1 week if no further activity occurs. If you think that’s incorrect or this pull request requires a review, please simply write any comment. If closed, you can revive the PR at any time and @mention a reviewer or discuss it on the dev@iceberg.apache.org list. Thank you for your contributions.


-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [PR] Kafka Connect: Improve error logging for invalid partition spec [iceberg]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #14714:
URL: https://github.com/apache/iceberg/pull/14714#issuecomment-3697883390

   This pull request has been marked as stale due to 30 days of inactivity. It will be closed in 1 week if no further activity occurs. If you think that’s incorrect or this pull request requires a review, please simply write any comment. If closed, you can revive the PR at any time and @mention a reviewer or discuss it on the dev@iceberg.apache.org list. Thank you for your contributions.


-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org