voonhous commented on code in PR #17535:
URL: https://github.com/apache/hudi/pull/17535#discussion_r2615047682


##########
hudi-common/src/main/java/org/apache/hudi/common/schema/HoodieSchemaCompatibility.java:
##########
@@ -121,6 +123,26 @@ public static boolean isSchemaCompatible(HoodieSchema 
readerSchema, HoodieSchema
     return isSchemaCompatible(readerSchema, writerSchema, true);
   }
 
+  /**
+   * Checks if two schemas are compatible with projection support.
+   * This allows the reader schema to have fewer fields than the writer schema.
+   *
+   * @param readerSchema    the schema used to read the data
+   * @param writerSchema    the schema used to write the data
+   * @param checkNaming     controls whether schemas fully-qualified names 
should be checked
+   * @param allowProjection whether to allow fewer fields in reader schema
+   * @return true if reader schema can read data written with writer schema
+   * @throws IllegalArgumentException if schemas are null
+   */
+  public static boolean isSchemaCompatible(HoodieSchema readerSchema, 
HoodieSchema writerSchema,

Review Comment:
   Nope, I'll add some.



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

Reply via email to