InvisibleProgrammer commented on code in PR #6449:
URL: https://github.com/apache/hive/pull/6449#discussion_r3346172004
##########
iceberg/iceberg-catalog/src/main/java/org/apache/iceberg/hive/client/HiveRESTCatalogClient.java:
##########
@@ -123,10 +131,20 @@ public List<String> getTables(String catName, String
dbName, String tablePattern
Pattern pattern = Pattern.compile(regex);
// List tables from the specific database (namespace) and filter them.
- return restCatalog.listTables(Namespace.of(dbName)).stream()
+ Set<String> names = new LinkedHashSet<>();
+ restCatalog.listTables(Namespace.of(dbName)).stream()
.map(TableIdentifier::name)
.filter(pattern.asPredicate())
- .toList();
+ .forEach(names::add);
+
+ if (restCatalog instanceof ViewCatalog viewCatalog) {
Review Comment:
I find it a really interesting question:
In Hive, we consider views as tables. In Iceberg, view is just a view, not a
table.
I'm not sure about the purpose of the rest client:
if it serves as an interface for Hive only, adding the views to the tables
is fine.
If the goal is to provide an interface to Iceberg, I would add a new
endpoint that lists the view.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]