jerryshao commented on code in PR #4942:
URL: https://github.com/apache/gravitino/pull/4942#discussion_r1769507684
##########
catalogs/catalog-lakehouse-hudi/src/main/java/org/apache/gravitino/catalog/lakehouse/hudi/backend/hms/HudiHMSBackendOps.java:
##########
@@ -73,12 +125,51 @@ public boolean dropSchema(NameIdentifier ident, boolean
cascade) throws NonEmpty
@Override
public NameIdentifier[] listTables(Namespace namespace) throws
NoSuchSchemaException {
- throw new UnsupportedOperationException("Not implemented yet");
+ NameIdentifier schemaIdent = NameIdentifier.of(namespace.levels());
+ if (!schemaExists(schemaIdent)) {
+ throw new NoSuchSchemaException("Schema (database) does not exist %s",
namespace);
+ }
+
+ try {
+ return clientPool.run(
+ c ->
+ c.getTables(schemaIdent.name(), "*").stream()
+ .map(table -> NameIdentifier.of(namespace, table))
+ .toArray(NameIdentifier[]::new));
Review Comment:
Will here list all the tables, not just Hudi table, should we filter out
non-hudi table?
--
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]