danny0405 commented on code in PR #10300:
URL: https://github.com/apache/hudi/pull/10300#discussion_r1423326760
##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/table/catalog/TableOptionProperties.java:
##########
@@ -189,7 +190,16 @@ public static Map<String, String>
translateFlinkTableProperties2Spark(
return properties.entrySet().stream()
.filter(e -> KEY_MAPPING.containsKey(e.getKey()) &&
!catalogTable.getOptions().containsKey(KEY_MAPPING.get(e.getKey())))
.collect(Collectors.toMap(e -> KEY_MAPPING.get(e.getKey()),
- e -> e.getKey().equalsIgnoreCase(FlinkOptions.TABLE_TYPE.key()) ?
VALUE_MAPPING.get(e.getValue()) : e.getValue()));
+ e -> {
+ if (e.getKey().equalsIgnoreCase(FlinkOptions.TABLE_TYPE.key())) {
+ String sparkTableType = VALUE_MAPPING.get(e.getValue());
+ if (sparkTableType == null) {
+ throw new HoodieValidationException(String.format("%s's
value is invalid", e.getKey()));
+ }
Review Comment:
Nice catch, can you write a UT in `TestHoodieCatalog` ?
--
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]