codope commented on a change in pull request #4676: URL: https://github.com/apache/hudi/pull/4676#discussion_r832778252
########## File path: hudi-common/src/test/java/org/apache/hudi/common/model/TestPartialUpdateAvroPayload.java ########## @@ -0,0 +1,172 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.hudi.common.model; + +import org.apache.avro.JsonProperties; +import org.apache.avro.Schema; +import org.apache.avro.generic.GenericData; +import org.apache.avro.generic.GenericRecord; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; + +import java.io.IOException; +import java.util.Arrays; +import java.util.Collections; + +import static org.junit.jupiter.api.Assertions.*; + +/** + * Unit tests {@link TestPartialUpdateAvroPayload}. + */ +public class TestPartialUpdateAvroPayload { Review comment: While this UT covers the payload itself, can we also add some end-to-end test with payload class config changed, one for deltastreamer with compaction and another for datasource with compaction? ########## File path: hudi-client/hudi-client-common/src/main/java/org/apache/hudi/table/action/commit/AbstractWriteHelper.java ########## @@ -81,10 +82,10 @@ public I combineOnCondition( * @return Collection of HoodieRecord already be deduplicated */ public I deduplicateRecords( - I records, HoodieTable<T, I, K, O> table, int parallelism) { - return deduplicateRecords(records, table.getIndex(), parallelism); + I records, HoodieTable<T, I, K, O> table, int parallelism, HoodieWriteConfig config) { Review comment: Is there a way to just pass the schema and not the whole write config around? ########## File path: hudi-common/src/main/java/org/apache/hudi/common/model/HoodieRecordPayload.java ########## @@ -44,6 +44,11 @@ @PublicAPIMethod(maturity = ApiMaturityLevel.DEPRECATED) T preCombine(T oldValue); + @PublicAPIMethod(maturity = ApiMaturityLevel.DEPRECATED) Review comment: Let's add javadoc here. It should be clear to the users why we need this API with schema -- 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]
