chl-wxp commented on code in PR #5535:
URL: https://github.com/apache/seatunnel/pull/5535#discussion_r1361529901


##########
seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/catalog/mysql/MySqlCatalog.java:
##########
@@ -200,4 +201,16 @@ private SeaTunnelDataType<?> fromJdbcType(String typeName, 
int precision, int sc
         dataTypeProperties.put(MysqlDataTypeConvertor.SCALE, scale);
         return DATA_TYPE_CONVERTOR.toSeaTunnelType(mysqlType, 
dataTypeProperties);
     }
+
+    @Override
+    protected String getTruncateTableSql(TablePath tablePath) throws 
CatalogException {
+        return String.format(
+                "TRUNCATE TABLE %s.%s;", tablePath.getDatabaseName(), 
tablePath.getTableName());
+    }
+
+    public String getCountSql(TablePath tablePath) {
+        return String.format(
+                "select * from %s.%s limit 1;",
+                tablePath.getDatabaseName(), tablePath.getTableName());
+    }

Review Comment:
   Has been resolved



##########
seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/catalog/oracle/OracleCatalog.java:
##########
@@ -223,4 +235,16 @@ protected String getUrlFromDatabaseName(String 
databaseName) {
     protected String getOptionTableName(TablePath tablePath) {
         return tablePath.getSchemaAndTableName();
     }
+
+    public String getCountSql(TablePath tablePath) {
+        return String.format(
+                "select * from %s.%s WHERE ROWNUM=1 ",
+                tablePath.getSchemaName(), tablePath.getTableName());

Review Comment:
   Has been resolved



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