moggaa commented on code in PR #17653:
URL: https://github.com/apache/iceberg/pull/17653#discussion_r4241810839


##########
kafka-connect/kafka-connect/src/main/java/org/apache/iceberg/connect/data/RecordConverter.java:
##########
@@ -356,12 +359,32 @@ private void evolveSchemaFromConnectSchema(
     }
   }
 
+  private void logIfNullForRequiredColumn(
+      Object value, NestedField tableField, boolean hasSchemaUpdates) {
+    if (value == null && tableField.isRequired() && !hasSchemaUpdates) {
+      LOG.warn(
+          "Explicit null value for required column {}; the write will fail. 
Consider setting"

Review Comment:
   Done in c6b8deeee — reworded to `Null value for required column …` and kept 
the condition, so the default path still gets the heads-up without the 
misleading wording. Added a line to the docs that the warning also fires under 
the default setting when the field has no schema default to substitute, and 
added `testStructWithNullValueForRequiredColumn` exercising a required column 
receiving null under both settings (the null reaches the column either way 
since there's no default to substitute).
   



-- 
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]

Reply via email to