TengHuo commented on code in PR #9199:
URL: https://github.com/apache/hudi/pull/9199#discussion_r1375761677


##########
hudi-client/hudi-spark-client/src/main/scala/org/apache/hudi/HoodieDatasetBulkInsertHelper.scala:
##########
@@ -155,17 +156,34 @@ object HoodieDatasetBulkInsertHelper
       val taskPartitionId = taskContextSupplier.getPartitionIdSupplier.get
       val taskId = taskContextSupplier.getStageIdSupplier.get.toLong
       val taskEpochId = taskContextSupplier.getAttemptIdSupplier.get
-      val writer = new BulkInsertDataInternalWriterHelper(
-        table,
-        writeConfig,
-        instantTime,
-        taskPartitionId,
-        taskId,
-        taskEpochId,
-        schema,
-        writeConfig.populateMetaFields,
-        arePartitionRecordsSorted,
-        shouldPreserveHoodieMetadata)
+
+      val writer = writeConfig.getIndexType match {
+        case HoodieIndex.IndexType.BUCKET if 
writeConfig.getBucketIndexEngineType
+          == BucketIndexEngineType.CONSISTENT_HASHING =>
+          new ConsistentBucketBulkInsertDataInternalWriterHelper(
+            table,
+            writeConfig,
+            instantTime,
+            taskPartitionId,
+            taskId,
+            taskEpochId,
+            schema,
+            writeConfig.populateMetaFields,
+            arePartitionRecordsSorted,
+            shouldPreserveHoodieMetadata)
+        case _ =>

Review Comment:
   Should we support SIMPLE bucket index as well?
   
   It uses `BucketBulkInsertDataInternalWriterHelper`.



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