nsivabalan commented on a change in pull request #3817:
URL: https://github.com/apache/hudi/pull/3817#discussion_r732380941
##########
File path:
hudi-spark-datasource/hudi-spark/src/main/java/org/apache/hudi/HoodieDatasetBulkInsertHelper.java
##########
@@ -80,17 +81,18 @@
String keyGeneratorClass =
properties.getString(DataSourceWriteOptions.KEYGENERATOR_CLASS_NAME().key());
BuiltinKeyGenerator keyGenerator = (BuiltinKeyGenerator)
ReflectionUtils.loadClass(keyGeneratorClass, properties);
StructType structTypeForUDF = rows.schema();
-
- sqlContext.udf().register(RECORD_KEY_UDF_FN, (UDF1<Row, String>)
keyGenerator::getRecordKey, DataTypes.StringType);
- sqlContext.udf().register(PARTITION_PATH_UDF_FN, (UDF1<Row, String>)
keyGenerator::getPartitionPath, DataTypes.StringType);
+ String recordKeyUdfFnCurrent = RECORD_KEY_UDF_FN +
UUID.randomUUID().toString();
+ String partitionPathUdfFnCurrent = PARTITION_PATH_UDF_FN +
UUID.randomUUID().toString();
+ sqlContext.udf().register(recordKeyUdfFnCurrent, (UDF1<Row, String>)
keyGenerator::getRecordKey, DataTypes.StringType);
Review comment:
let me think about the actual fix. should we suffix table name or base
path may be instead of random Id.
--
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]