linliu-code commented on code in PR #13424:
URL: https://github.com/apache/hudi/pull/13424#discussion_r2302396356
##########
hudi-aws/src/main/java/org/apache/hudi/config/GlueCatalogSyncClientConfig.java:
##########
@@ -97,4 +103,21 @@ public class GlueCatalogSyncClientConfig extends
HoodieConfig {
.markAdvanced()
.withDocumentation("Glue sync may fail if the Glue table exists with
partitions differing from the Hoodie table or if schema evolution is not
supported by Glue."
+ "Enabling this configuration will drop and create the table to
match the Hoodie config");
+
+ public static final ConfigProperty<String> GLUE_SYNC_DATABASE_NAME =
ConfigProperty
+ .key(GLUE_CLIENT_PROPERTY_PREFIX + "database_name")
+ .noDefaultValue()
+ .withInferFunction(cfg ->
Option.ofNullable(cfg.getString(META_SYNC_DATABASE_NAME.key()))
+ .or(() -> Option.of(cfg.getStringOrDefault(DATABASE_NAME,
DATABASE_NAME.defaultValue()))))
Review Comment:
`DATABASE_NAME.defaultValue()`: the default value is null, therefore, will
`Option.of()` should throw NPE.
--
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]