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


##########
hudi-spark-datasource/hudi-spark-common/src/main/java/org/apache/hudi/HoodieDatasetBulkInsertHelper.java:
##########
@@ -87,18 +86,15 @@ public static Dataset<Row> 
prepareHoodieDatasetForBulkInsert(SQLContext sqlConte
     BuiltinKeyGenerator keyGenerator = (BuiltinKeyGenerator) 
ReflectionUtils.loadClass(keyGeneratorClass, properties);
 
     Dataset<Row> rowDatasetWithRecordKeysAndPartitionPath;
-    if (keyGeneratorClass.equals(NonpartitionedKeyGenerator.class.getName())) {
+    if (keyGeneratorClass.equals(NonpartitionedKeyGenerator.class.getName())
+        || (keyGeneratorClass.equals(SimpleKeyGenerator.class.getName()) && 
!config.isHiveStylePartitioningEnabled())) {

Review Comment:
   yeah, this PR will fall back to UDF if hive style partition enabled, same 
logic as 0.10.
   
   think PR #6049 is a better fix which can improve performance by using 
withColumn



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