danny0405 commented on code in PR #7895:
URL: https://github.com/apache/hudi/pull/7895#discussion_r1122612621
##########
hudi-common/src/main/java/org/apache/hudi/avro/AvroSchemaUtils.java:
##########
@@ -76,7 +87,18 @@ public static boolean isSchemaCompatible(Schema prevSchema,
Schema newSchema, bo
* @return true if prev schema is a projection of new schema.
*/
public static boolean canProject(Schema prevSchema, Schema newSchema) {
+ return canProject(prevSchema, newSchema, Collections.emptySet());
+ }
+
+ /**
+ * Check that each field in the prevSchema can be populated in the newSchema
except specified columns
+ * @param prevSchema prev schema.
+ * @param newSchema new schema
+ * @return true if prev schema is a projection of new schema.
+ */
+ public static boolean canProject(Schema prevSchema, Schema newSchema,
Collection<String> exceptCols) {
Review Comment:
Use `Set` instead of `Collection` so that the invoker can ensure the
efficiency.
--
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]