mygrsun commented on code in PR #4469:
URL: https://github.com/apache/gravitino/pull/4469#discussion_r1724430186


##########
catalogs/catalog-hive/src/main/java/org/apache/gravitino/catalog/hive/HiveCatalogOperations.java:
##########
@@ -557,23 +556,18 @@ public NameIdentifier[] listTables(Namespace namespace) 
throws NoSuchSchemaExcep
       // then based on
       // those names we can obtain metadata for each individual table and get 
the type we needed.
       List<String> allTables = clientPool.run(c -> 
c.getAllTables(schemaIdent.name()));
-      return clientPool.run(
-          c ->
-              c.getTableObjectsByName(schemaIdent.name(), allTables).stream()
-                  .filter(
-                      tb -> {
-                        boolean isSupportTable = 
SUPPORT_TABLE_TYPES.contains(tb.getTableType());
-                        if (!isSupportTable) {
-                          return false;
-                        }
-                        if (!listAllTables) {
-                          Map<String, String> parameters = tb.getParameters();
-                          return isHiveTable(parameters);
-                        }
-                        return true;
-                      })
-                  .map(tb -> NameIdentifier.of(namespace, tb.getTableName()))
-                  .toArray(NameIdentifier[]::new));
+      if (!listAllTables) {
+        String filter =
+            String.format(
+                "%stable_type = \"ICEBERG\"", 
hive_metastoreConstants.HIVE_FILTER_FIELD_PARAMS);

Review Comment:
   Now,the ci issue is a troublesome problem. 
https://github.com/apache/gravitino/actions/runs/10452698362/job/28942732918?pr=4469
    This ci issue is due to a bug in hive, and the iceberg project has the same 
proble.
   https://github.com/apache/iceberg/pull/2722#issuecomment-867363019
   <img width="1240" alt="image" 
src="https://github.com/user-attachments/assets/4b49b466-dc17-4749-89c4-1f7267aa90e7";>
   
   This hive bug is only happen in Derby. In our environment , the metastore 
storage is mysql,so we don't encounter this problem.



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