zhuanshenbsj1 commented on code in PR #7159:
URL: https://github.com/apache/hudi/pull/7159#discussion_r1046699321


##########
hudi-spark-datasource/hudi-spark/src/test/scala/org/apache/hudi/functional/cdc/TestCDCDataFrameSuite.scala:
##########
@@ -118,6 +118,7 @@ class TestCDCDataFrameSuite extends HoodieCDCTestBase {
       .option(DataSourceWriteOptions.OPERATION.key, 
DataSourceWriteOptions.DELETE_OPERATION_OPT_VAL)
       .option("hoodie.clustering.inline", "true")
       .option("hoodie.clustering.inline.max.commits", "1")
+      .option("hoodie.clustering.plan.strategy.sort.columns", "_row_key")
       .mode(SaveMode.Append)

Review Comment:
   Without this change,after inputDF5 the timeline will be:
      
commit(instantC,cleaned)->clustering(instantD,cleaned)->commit(instantE)->clean(instantF)
   and file belong to instantA will archived,  it will case line-193 -> line 
194:
      allVisibleCDCData = cdcDataFrame((commitTime1.toLong - 1).toString)
      assertCDCOpCnt(allVisibleCDCData, totalInsertedCnt, totalUpdatedCnt, 
totalDeletedCnt)
   can't get instantC file error. 
   
   With this change, after after inputDF5 the timeline will be:
      
clustering(instantD,cleaned)->clustering(instantE,cleaned)->commit(instantF)->clean(instantG),
   it will fix this problem.
   



-- 
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: commits-unsubscr...@hudi.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to