Skip to content

Commit

Permalink
remove option check for doris.password whose default value is set to …
Browse files Browse the repository at this point in the history
…empty string
  • Loading branch information
gnehil committed Jan 3, 2025
1 parent b81bf16 commit 5953caa
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,6 @@ private void checkOptions(Map<String, String> options) throws OptionRequiredExce
} else if (options.get(DorisOptions.DORIS_USER.getName()).isEmpty()) {
throw new IllegalArgumentException("option [" + DorisOptions.DORIS_USER.getName() + "] is empty");
}
if (!options.containsKey(DorisOptions.DORIS_PASSWORD.getName())) {
throw new OptionRequiredException(DorisOptions.DORIS_PASSWORD.getName());
}
if ("thrift".equalsIgnoreCase(options.get(DorisOptions.READ_MODE.getName()))) {
if (Boolean.parseBoolean(options.get(DorisOptions.DORIS_READ_BITMAP_TO_STRING.getName()))) {
throw new IllegalArgumentException(String.format("option [%s] is invalid in thrift read mode",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public class DorisOptions {

// use password to save doris.request.auth.password
// reuse credentials mask method in spark ExternalCatalogUtils#maskCredentials
public static final ConfigOption<String> DORIS_PASSWORD = ConfigOptions.name("doris.password").stringType().withoutDefaultValue().withDescription("");
public static final ConfigOption<String> DORIS_PASSWORD = ConfigOptions.name("doris.password").stringType().defaultValue("").withDescription("");

public static final ConfigOption<Integer> DORIS_REQUEST_RETRIES = ConfigOptions.name("doris.request.retries").intType().defaultValue(3).withDescription("");
public static final ConfigOption<Integer> DORIS_REQUEST_CONNECT_TIMEOUT_MS = ConfigOptions.name("doris.request.connect.timeout.ms").intType().defaultValue(30 * 1000).withDescription("");
Expand Down

0 comments on commit 5953caa

Please sign in to comment.