manuzhang commented on code in PR #14618:
URL: https://github.com/apache/iceberg/pull/14618#discussion_r2616385169
##########
kafka-connect/kafka-connect/src/main/java/org/apache/iceberg/connect/data/IcebergWriter.java:
##########
@@ -57,22 +57,34 @@ private void initNewWriter() {
@Override
public void write(SinkRecord record) {
+ Record row = null;
try {
// ignore tombstones...
if (record.value() != null) {
- Record row = convertToRow(record);
- writer.write(row);
+ row = convertToRow(record);
}
} catch (Exception e) {
+ String recordData = "";
Review Comment:
This can be simplified with a conditional operator `?:`.
--
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]