nsivabalan commented on a change in pull request #3817:
URL: https://github.com/apache/hudi/pull/3817#discussion_r734753400
##########
File path:
hudi-spark-datasource/hudi-spark/src/main/java/org/apache/hudi/HoodieDatasetBulkInsertHelper.java
##########
@@ -79,18 +78,19 @@
properties.putAll(config.getProps());
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 tableName = properties.getString(HoodieWriteConfig.TBL_NAME.key());
+ String recordKeyUdfFnCurrent = RECORD_KEY_UDF_FN + tableName;
Review comment:
we don't need to name the variable with "current" suffix. the value I
understand.
--
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]