diff --git a/tikv-client/src/main/java/com/pingcap/tikv/catalog/Catalog.java b/tikv-client/src/main/java/com/pingcap/tikv/catalog/Catalog.java index 6c33b137b6..1662d2b3e1 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/catalog/Catalog.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/catalog/Catalog.java @@ -86,7 +86,7 @@ public List listTables(TiDBInfo db) { tableMap = loadTables(db); } Collection tables = tableMap.values(); - return tables.stream().filter(TiTableInfo::isNotView).collect(Collectors.toList()); + return tables.stream().filter(tbl -> !tbl.isView()).collect(Collectors.toList()); } public TiTableInfo getTable(TiDBInfo db, String tableName) { diff --git a/tikv-client/src/main/java/com/pingcap/tikv/meta/TiTableInfo.java b/tikv-client/src/main/java/com/pingcap/tikv/meta/TiTableInfo.java index 60707d28dc..7e863b088f 100644 --- a/tikv-client/src/main/java/com/pingcap/tikv/meta/TiTableInfo.java +++ b/tikv-client/src/main/java/com/pingcap/tikv/meta/TiTableInfo.java @@ -94,10 +94,6 @@ public TiTableInfo( primaryKeyColumn = primaryKey; } - public boolean isNotView() { - return this.viewInfo == null; - } - public boolean isView() { return this.viewInfo != null; }