Skip to content

Commit cca96b4

Browse files
githubgxllketor
authored andcommitted
[dingo-calcite],[dingo-client] Fix create table and failure of dropTable issues
1 parent f8403a3 commit cca96b4

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

dingo-client/src/main/java/io/dingodb/client/DingoClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ public boolean dropTable(String tableName) {
9292

9393
@Deprecated
9494
public boolean dropTable(String schema, String table) {
95-
return operationService.dropTable(schema, table);
95+
return dropTables(schema, Collections.singletonList(table));
9696
}
9797

9898
@Deprecated

dingo-driver/host/src/main/java/io/dingodb/driver/DingoDriverParser.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,13 @@ public Meta.Signature parseQuery(
291291
if (!(sqlNode instanceof DingoSqlCreateTable) || retry <= 0) {
292292
throw e;
293293
}
294+
} catch (RuntimeException e) {
295+
// java.lang.RuntimeException: While invoking method 'public void io.dingodb.calcite.DingoDdlExecutor.execute(org.apache.calcite.sql.ddl.SqlCreateTable,org.apache.calcite.jdbc.CalcitePrepare$Context)'
296+
LogUtils.error(log, e.getMessage(), e);
297+
if (!(sqlNode instanceof DingoSqlCreateTable) || retry <= 0
298+
|| !e.getMessage().startsWith("While invoking method")) {
299+
throw e;
300+
}
294301
}
295302
}
296303
execProfile.end();

0 commit comments

Comments
 (0)