danny0405 commented on code in PR #17994:
URL: https://github.com/apache/hudi/pull/17994#discussion_r2726340445
##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/configuration/OptionsResolver.java:
##########
@@ -429,14 +445,10 @@ public static HoodieIndex.IndexType
getIndexType(Configuration conf) {
* Returns the index key field.
*/
public static String getIndexKeyField(Configuration conf) {
- return conf.getString(FlinkOptions.INDEX_KEY_FIELD.key(),
conf.get(FlinkOptions.RECORD_KEY_FIELD));
- }
-
- /**
- * Returns the index key field values.
- */
- public static String[] getIndexKeys(Configuration conf) {
- return getIndexKeyField(conf).split(",");
+ // could be called internally from writer builders and from Flink operator
functions with different parameter absence processing,
+ // therefore we return empty string instead of null to prevent failures
+ String indexKeyField = conf.getString(FlinkOptions.INDEX_KEY_FIELD.key(),
conf.get(FlinkOptions.RECORD_KEY_FIELD));
Review Comment:
add check in `HoodieTableFactory` or fix the tests to setup the index key
correctly.
--
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]