diff --git a/seatunnel-connectors-v2/connector-doris/src/main/java/org/apache/seatunnel/connectors/doris/config/DorisOptions.java b/seatunnel-connectors-v2/connector-doris/src/main/java/org/apache/seatunnel/connectors/doris/config/DorisOptions.java index 7779cae081b6..35ef93472215 100644 --- a/seatunnel-connectors-v2/connector-doris/src/main/java/org/apache/seatunnel/connectors/doris/config/DorisOptions.java +++ b/seatunnel-connectors-v2/connector-doris/src/main/java/org/apache/seatunnel/connectors/doris/config/DorisOptions.java @@ -17,13 +17,14 @@ package org.apache.seatunnel.connectors.doris.config; +import org.apache.seatunnel.shade.com.google.common.collect.ImmutableMap; + import org.apache.seatunnel.api.configuration.Option; import org.apache.seatunnel.api.configuration.Options; import org.apache.seatunnel.api.configuration.SingleChoiceOption; import org.apache.seatunnel.api.configuration.util.OptionRule; import org.apache.seatunnel.api.sink.DataSaveMode; import org.apache.seatunnel.api.sink.SupportDataSaveMode; -import org.apache.seatunnel.shade.com.google.common.collect.ImmutableMap; import java.util.Collections; import java.util.Map; @@ -45,11 +46,11 @@ public interface DorisOptions { int DEFAULT_SINK_BUFFER_SIZE = 256 * 1024; int DEFAULT_SINK_BUFFER_COUNT = 3; - Map DEFAULT_CREATE_PROPERTIES = ImmutableMap.of( - "replication_allocation", "tag.location.default: 3", - "storage_format", "V2", - "disable_auto_compaction", "false" - ); + Map DEFAULT_CREATE_PROPERTIES = + ImmutableMap.of( + "replication_allocation", "tag.location.default: 3", + "storage_format", "V2", + "disable_auto_compaction", "false"); String DEFAULT_CREATE_TEMPLATE = "CREATE TABLE ${table_identifier}\n" @@ -250,7 +251,11 @@ public interface DorisOptions { OptionRule.builder().required(FENODES, USERNAME, PASSWORD, TABLE_IDENTIFIER); OptionRule.Builder CATALOG_RULE = - OptionRule.builder().required(FENODES, QUERY_PORT, USERNAME, PASSWORD) + OptionRule.builder() + .required(FENODES, QUERY_PORT, USERNAME, PASSWORD) .optional(SAVE_MODE) - .conditional(SAVE_MODE, DataSaveMode.KEEP_SCHEMA_AND_DATA, CREATE_DISTRIBUTION_COLUMNS); + .conditional( + SAVE_MODE, + DataSaveMode.KEEP_SCHEMA_AND_DATA, + CREATE_DISTRIBUTION_COLUMNS); } diff --git a/seatunnel-connectors-v2/connector-doris/src/main/java/org/apache/seatunnel/connectors/doris/util/DorisCatalogUtil.java b/seatunnel-connectors-v2/connector-doris/src/main/java/org/apache/seatunnel/connectors/doris/util/DorisCatalogUtil.java index e3a4812ef28e..591aac50d8d6 100644 --- a/seatunnel-connectors-v2/connector-doris/src/main/java/org/apache/seatunnel/connectors/doris/util/DorisCatalogUtil.java +++ b/seatunnel-connectors-v2/connector-doris/src/main/java/org/apache/seatunnel/connectors/doris/util/DorisCatalogUtil.java @@ -208,7 +208,9 @@ private static String buildColumnDefinition(List columns) { name, type, nullable ? " NULL" : " NOT NULL", - nullable || defaultValue == null ? "" : " DEFAULT \"" + defaultValue + "\"", + nullable || defaultValue == null + ? "" + : " DEFAULT \"" + defaultValue + "\"", " COMMENT \"" + comment + "\"")); }