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


##########
seatunnel-connectors-v2/connector-paimon/src/main/java/org/apache/seatunnel/connectors/seatunnel/paimon/catalog/PaimonCatalog.java:
##########
@@ -123,7 +127,16 @@ public List<String> listTables(String databaseName)
 
     @Override
     public boolean tableExists(TablePath tablePath) throws CatalogException {
-        return catalog.tableExists(toIdentifier(tablePath));
+        Identifier identifier = toIdentifier(tablePath);
+        List<String> tables = new ArrayList<>();
+        try {
+            if (databaseExists(identifier.getDatabaseName())) {
+                tables = catalog.listTables(identifier.getDatabaseName());
+            }
+        } catch (org.apache.paimon.catalog.Catalog.DatabaseNotExistException 
e) {
+            throw new DatabaseNotExistException(this.catalogName, 
identifier.getDatabaseName());

Review Comment:
   ```suggestion
               return false;
   ```



##########
seatunnel-connectors-v2/connector-paimon/src/main/java/org/apache/seatunnel/connectors/seatunnel/paimon/catalog/PaimonCatalog.java:
##########
@@ -216,7 +229,9 @@ private Schema buildPaimonSchema(@NonNull 
org.apache.paimon.schema.TableSchema s
         Schema.Builder builder = Schema.newBuilder();
         schema.fields()
                 .forEach(field -> builder.column(field.name(), field.type(), 
field.description()));
-        builder.options(schema.options());
+        Map<String, String> options = new HashMap<>(schema.options());
+        options.remove(CoreOptions.PATH.key());

Review Comment:
   Please add a comment of why remove this?



##########
seatunnel-e2e/seatunnel-connector-v2-e2e/connector-paimon-e2e/src/test/resources/fake_cdc_sink_paimon_case9.conf:
##########
@@ -70,5 +70,8 @@ sink {
     warehouse = "file:///tmp/paimon"
     database = "seatunnel_namespace9"
     table = "st_test"
+    paimon.table.write-props = {
+      bucket = 1
+    }

Review Comment:
   Is the change necessary?



##########
seatunnel-connectors-v2/connector-paimon/src/main/java/org/apache/seatunnel/connectors/seatunnel/paimon/sink/PaimonSinkWriter.java:
##########
@@ -128,10 +128,9 @@ public PaimonSinkWriter(
         this.sinkPaimonTableSchema = this.paimonFileStoretable.schema();
         this.newTableWrite();
         BucketMode bucketMode = this.paimonFileStoretable.bucketMode();
-        this.dynamicBucket =
-                BucketMode.DYNAMIC == bucketMode || BucketMode.GLOBAL_DYNAMIC 
== bucketMode;

Review Comment:
   why remove `GLOBAL_DYNAMIC`?



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