danielcweeks commented on code in PR #15209:
URL: https://github.com/apache/iceberg/pull/15209#discussion_r2800022754
##########
kafka-connect/kafka-connect/src/main/java/org/apache/iceberg/connect/data/IcebergWriterFactory.java:
##########
@@ -80,7 +86,10 @@ Table autoCreateTable(String tableName, SinkRecord sample) {
}
structType = type.asStructType();
} else {
- structType = SchemaUtils.toIcebergType(sample.valueSchema(),
config).asStructType();
+ structType =
+ SchemaUtils.toIcebergType(
+ sample.valueSchema(), config,
SchemaUtils.includeDefaults(formatVersion))
Review Comment:
I don't think we need a utility method here as it makes this more confusing.
You can just do the check (`boolean includeDefaults = formatVersion >=
DEFAULT_VALUE_MIN_FORMAT_VERSION`) after we get the version number above on
like ~80.
--
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]