moggaa commented on code in PR #17653:
URL: https://github.com/apache/iceberg/pull/17653#discussion_r4122017130
##########
kafka-connect/kafka-connect/src/main/java/org/apache/iceberg/connect/data/RecordConverter.java:
##########
@@ -362,6 +362,18 @@ private void logMismatchedType(
"Record schema of type {} does not match table of type {}",
recordSchemaType, tableType);
}
+ /**
+ * Reads a struct field value. {@link Struct#get(Field)} substitutes the
schema default value when
+ * the stored value is null, which turns an explicit null into the default;
whether that
+ * substitution happens is controlled by the {@code
iceberg.tables.replace-null-with-default}
+ * setting.
+ */
+ private Object fieldValue(Struct struct, Field field) {
+ return config.replaceNullWithDefault()
Review Comment:
Both done in 13d704898 — renamed to `fieldValueFromStruct`, and the option
value is now cached in a `final boolean` in the constructor.
--
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]