rambleraptor commented on code in PR #14266:
URL: https://github.com/apache/iceberg/pull/14266#discussion_r2543431195
##########
api/src/main/java/org/apache/iceberg/types/CheckCompatibility.java:
##########
@@ -53,7 +67,24 @@ public static List<String> writeCompatibilityErrors(Schema
readSchema, Schema wr
*/
public static List<String> writeCompatibilityErrors(
Schema readSchema, Schema writeSchema, boolean checkOrdering) {
- return TypeUtil.visit(readSchema, new CheckCompatibility(writeSchema,
checkOrdering, true));
+ return writeCompatibilityErrors(readSchema, writeSchema, checkOrdering, 2);
+ }
+
+ /**
+ * Returns a list of compatibility errors for writing with the given write
schema. This includes
+ * nullability: writing optional (nullable) values to a required field is an
error Optionally this
+ * method allows case where input schema has different ordering than table
schema.
+ *
+ * @param readSchema a read schema
+ * @param writeSchema a write schema
+ * @param checkOrdering If false, allow input schema to have different
ordering than table schema
Review Comment:
I believe so.
--
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]