Samrat002 commented on a change in pull request #3184:
URL: https://github.com/apache/hudi/pull/3184#discussion_r671635600



##########
File path: 
hudi-utilities/src/test/java/org/apache/hudi/utilities/functional/TestHoodieDeltaStreamer.java
##########
@@ -1695,6 +1695,54 @@ public void 
testJdbcSourceIncrementalFetchInContinuousMode() {
     }
   }
 
+  @Test
+  public void testInsertOverwrite() throws Exception {
+    String tableBasePath = dfsBasePath + "/insert_overwrite";
+    // Initial insert
+    HoodieDeltaStreamer.Config cfg = TestHelpers.makeConfig(tableBasePath, 
WriteOperationType.INSERT);
+    new HoodieDeltaStreamer(cfg, jsc).sync();
+    TestHelpers.assertRecordCount(1000, tableBasePath + "/*/*.parquet", 
sqlContext);
+    TestHelpers.assertDistanceCount(1000, tableBasePath + "/*/*.parquet", 
sqlContext);
+    TestHelpers.assertCommitMetadata("00000", tableBasePath, dfs, 1);
+    // No new data => no commits.
+    cfg.sourceLimit = 0;
+    new HoodieDeltaStreamer(cfg, jsc).sync();
+    TestHelpers.assertRecordCount(1000, tableBasePath + "/*/*.parquet", 
sqlContext);
+    TestHelpers.assertDistanceCount(1000, tableBasePath + "/*/*.parquet", 
sqlContext);
+    TestHelpers.assertCommitMetadata("00000", tableBasePath, dfs, 1);
+    // insert overwrite
+    cfg.sourceLimit = 1000;
+    cfg.operation = WriteOperationType.INSERT_OVERWRITE;

Review comment:
       created a ticket 
   https://issues.apache.org/jira/browse/HUDI-2188.
   I will pick this test next. It will take some more time to write it for me.
   
   




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