diff --git a/seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/internal/dialect/JdbcDialect.java b/seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/internal/dialect/JdbcDialect.java index d0bbff6b0fb1..79e55bf05125 100644 --- a/seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/internal/dialect/JdbcDialect.java +++ b/seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/internal/dialect/JdbcDialect.java @@ -440,10 +440,10 @@ default String convertType(String columnName, String columnType) { /** * Refresh physical table schema by schema change event * - * @param sourceDialectName - * @param event - * @param jdbcConnectionProvider - * @param sinkTablePath + * @param sourceDialectName source dialect name + * @param event schema change event + * @param jdbcConnectionProvider jdbc connection provider + * @param sinkTablePath sink table path */ default void refreshTableSchemaBySchemaChangeEvent( String sourceDialectName, @@ -454,9 +454,9 @@ default void refreshTableSchemaBySchemaChangeEvent( /** * generate alter table sql * - * @param sourceDialectName - * @param event - * @param sinkTablePath + * @param sourceDialectName source dialect name + * @param event schema change event + * @param sinkTablePath the table path of sink * @return */ default String generateAlterTableSql( @@ -512,11 +512,13 @@ default String generateAlterTableSql( /** * build alter table sql * - * @param alterOperation - * @param newColumn - * @param tableName - * @param oldColumnName - * @return + * @param sourceDialectName source dialect name + * @param sourceColumnType source column type + * @param alterOperation alter operation of ddl + * @param newColumn new column after ddl + * @param tableName table name of sink table + * @param oldColumnName old column name before ddl + * @return alter table sql for sink table after schema change */ default String buildAlterTableSql( String sourceDialectName, @@ -552,9 +554,9 @@ default String buildAlterTableSql( /** * build the body of alter table sql * - * @param alterOperation - * @param tableName - * @return + * @param alterOperation alter operation of ddl + * @param tableName table name of sink table + * @return basic sql of alter table for sink table */ default String buildAlterTableBasicSql(String alterOperation, String tableName) { StringBuilder sql = @@ -570,14 +572,14 @@ default String buildAlterTableBasicSql(String alterOperation, String tableName) /** * decorate the sql with column name and type * - * @param sourceDialectName - * @param sourceColumnType - * @param basicSql - * @param alterOperation - * @param newColumn - * @param oldColumnName - * @param columnType - * @return + * @param sourceDialectName source dialect name + * @param sourceColumnType source column type + * @param basicSql basic sql of alter table for sink table + * @param alterOperation alter operation of ddl + * @param newColumn new column after ddl + * @param oldColumnName old column name before ddl + * @param columnType column type of new column + * @return basic sql with column name and type of alter table for sink table */ default String decorateWithColumnNameAndType( String sourceDialectName, @@ -610,9 +612,9 @@ default String decorateWithColumnNameAndType( /** * decorate with nullable * - * @param basicSql - * @param typeBasicTypeDefine - * @return + * @param basicSql alter table sql for sink table + * @param typeBasicTypeDefine type basic type define of new column + * @return alter table sql with nullable for sink table */ default String decorateWithNullable( String basicSql, BasicTypeDefine typeBasicTypeDefine) { @@ -628,9 +630,9 @@ default String decorateWithNullable( /** * decorate with default value * - * @param basicSql - * @param typeBasicTypeDefine - * @return + * @param basicSql alter table sql for sink table + * @param typeBasicTypeDefine type basic type define of new column + * @return alter table sql with default value for sink table */ default String decorateWithDefaultValue( String basicSql, BasicTypeDefine typeBasicTypeDefine) { @@ -650,9 +652,9 @@ && needsQuotesWithDefaultValue(typeBasicTypeDefine.getColumnType()) /** * decorate with comment * - * @param basicSql - * @param typeBasicTypeDefine - * @return + * @param basicSql alter table sql for sink table + * @param typeBasicTypeDefine type basic type define of new column + * @return alter table sql with comment for sink table */ default String decorateWithComment( String basicSql, BasicTypeDefine typeBasicTypeDefine) { @@ -667,8 +669,8 @@ default String decorateWithComment( /** * whether quotes with default value * - * @param sqlType - * @return + * @param sqlType sql type of column + * @return whether needs quotes with the type */ default boolean needsQuotesWithDefaultValue(String sqlType) { return false; @@ -677,8 +679,8 @@ default boolean needsQuotesWithDefaultValue(String sqlType) { /** * whether is special default value e.g. current_timestamp * - * @param defaultValue - * @return + * @param defaultValue default value of column + * @return whether is special default value e.g current_timestamp */ default boolean isSpecialDefaultValue(Object defaultValue) { return false; @@ -687,8 +689,8 @@ default boolean isSpecialDefaultValue(Object defaultValue) { /** * quotes default value * - * @param defaultValue - * @return + * @param defaultValue default value of column + * @return quoted default value */ default String quotesDefaultValue(Object defaultValue) { return "'" + defaultValue + "'";