yihua commented on code in PR #13615:
URL: https://github.com/apache/hudi/pull/13615#discussion_r2277599931


##########
hudi-utilities/src/test/java/org/apache/hudi/utilities/deltastreamer/HoodieDeltaStreamerTestBase.java:
##########
@@ -650,7 +650,7 @@ static HoodieDeltaStreamer.Config makeConfig(String 
basePath, WriteOperationType
       }
       cfg.allowCommitOnNoCheckpointChange = allowCommitOnNoCheckpointChange;
       Triple<RecordMergeMode, String, String> mergeCfgs =
-          HoodieTableConfig.inferCorrectMergingBehavior(
+          HoodieTableConfig.inferMergingConfigsForWrites(

Review Comment:
   nit: could possibly get rid of these



##########
hudi-utilities/src/test/java/org/apache/hudi/utilities/deltastreamer/TestHoodieDeltaStreamer.java:
##########
@@ -1858,16 +1858,18 @@ public void testPayloadClassUpdate() throws Exception {
         true, false, null, "MERGE_ON_READ");
     new HoodieDeltaStreamer(cfg, jsc, fs, hiveServer.getHiveConf()).sync();
     assertRecordCount(1000, dataSetBasePath, sqlContext);
+    HoodieTableMetaClient metaClient = UtilHelpers.createMetaClient(jsc, 
dataSetBasePath, false);
+    assertEquals(metaClient.getTableConfig().getPayloadClass(), 
DefaultHoodieRecordPayload.class.getName());
 
     //now create one more deltaStreamer instance and update payload class
     cfg = TestHelpers.makeConfig(dataSetBasePath, 
WriteOperationType.BULK_INSERT,
         Collections.singletonList(SqlQueryBasedTransformer.class.getName()), 
PROPS_FILENAME_TEST_SOURCE, false,
         true, true, DummyAvroPayload.class.getName(), "MERGE_ON_READ");
     new HoodieDeltaStreamer(cfg, jsc, fs, hiveServer.getHiveConf());
 
-    //now assert that hoodie.properties file now has updated payload class name
-    HoodieTableMetaClient metaClient = UtilHelpers.createMetaClient(jsc, 
dataSetBasePath, false);
-    assertEquals(metaClient.getTableConfig().getPayloadClass(), 
DummyAvroPayload.class.getName());
+    // NOTE: Payload class cannot be updated, though the write can be executed 
using different payload classes in the runtime.
+    metaClient = HoodieTableMetaClient.reload(metaClient);

Review Comment:
   To throw an error in a follow-up to catch payload mismatch



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