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


##########
seatunnel-connectors-v2/connector-milvus/src/main/java/org/apache/seatunnel/connectors/seatunnel/milvus/catalog/MilvusCatalog.java:
##########
@@ -358,6 +361,9 @@ public void dropTable(TablePath tablePath, boolean 
ignoreIfNotExists)
     @Override
     public void createDatabase(TablePath tablePath, boolean ignoreIfExists)
             throws DatabaseAlreadyExistException, CatalogException {
+        if (databaseExists(tablePath.getDatabaseName()) && !ignoreIfExists) {

Review Comment:
   ditto



##########
seatunnel-connectors-v2/connector-milvus/src/main/java/org/apache/seatunnel/connectors/seatunnel/milvus/catalog/MilvusCatalog.java:
##########
@@ -348,6 +348,9 @@ private FieldType convertToFieldType(Column column, 
PrimaryKey primaryKey) {
     @Override
     public void dropTable(TablePath tablePath, boolean ignoreIfNotExists)
             throws TableNotExistException, CatalogException {
+        if (!tableExists(tablePath) && !ignoreIfNotExists) {
+            throw new TableNotExistException(catalogName, tablePath);
+        }
         this.client.dropCollection(
                 DropCollectionParam.newBuilder()

Review Comment:
   if `ignoreIfNotExists == true`, why we should continue execute 
`dropCollection`?



##########
seatunnel-connectors-v2/connector-milvus/src/main/java/org/apache/seatunnel/connectors/seatunnel/milvus/catalog/MilvusCatalog.java:
##########
@@ -372,6 +378,9 @@ public void createDatabase(TablePath tablePath, boolean 
ignoreIfExists)
     @Override
     public void dropDatabase(TablePath tablePath, boolean ignoreIfNotExists)
             throws DatabaseNotExistException, CatalogException {
+        if (!databaseExists(tablePath.getDatabaseName()) && 
!ignoreIfNotExists) {

Review Comment:
   ditto



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