Hisoka-X commented on code in PR #7634:
URL: https://github.com/apache/seatunnel/pull/7634#discussion_r1759643818


##########
seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/internal/dialect/JdbcDialect.java:
##########
@@ -438,72 +441,165 @@ default String convertType(String columnName, String 
columnType) {
     /**
      * Refresh physical table schema by schema change event
      *
-     * @param sourceDialectName source dialect name
      * @param event schema change event
-     * @param jdbcConnectionProvider jdbc connection provider
-     * @param sinkTablePath sink table path
+     * @param connection jdbc connection
+     * @param tablePath sink table path
      */
-    default void refreshTableSchemaBySchemaChangeEvent(
-            String sourceDialectName,
-            AlterTableColumnEvent event,
-            JdbcConnectionProvider jdbcConnectionProvider,
-            TablePath sinkTablePath) {}
+    default void applySchemaChange(
+            SchemaChangeEvent event, Connection connection, TablePath 
tablePath)
+            throws SQLException {
+        if (event instanceof AlterTableColumnsEvent) {

Review Comment:
   cc @dailai . Looks like add jdbc supported schema evolution? Not only jdbc 
mysql.



##########
seatunnel-connectors-v2/connector-iceberg/src/main/java/org/apache/seatunnel/connectors/seatunnel/iceberg/sink/writer/IcebergRecordWriter.java:
##########
@@ -91,6 +91,8 @@ record = recordConverter.convert(seaTunnelRow, rowType);
     public void applySchemaChange(SeaTunnelRowType afterRowType, 
SchemaChangeEvent event) {
         log.info("Apply schema change start.");
         SchemaChangeWrapper updates = new SchemaChangeWrapper();
+        // get the latest schema in case another process updated it

Review Comment:
   cc @dailai . So iceberg support schema evolution too? I think we should 
update the doc.



-- 
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]

Reply via email to