gortiz commented on code in PR #12591:
URL: https://github.com/apache/pinot/pull/12591#discussion_r1526667525
##########
pinot-query-planner/src/main/java/org/apache/pinot/query/catalog/PinotCatalog.java:
##########
@@ -75,7 +114,13 @@ public Table getTable(String name) {
*/
@Override
public Set<String> getTableNames() {
- return _tableCache.getTableNameMap().keySet();
+ if (_databaseName != null) {
+ return _tableCache.getTableNameMap().keySet().stream()
+ .filter(n -> DatabaseUtils.isPartOfDatabase(n, _databaseName))
+ .collect(Collectors.toSet());
+ } else {
+ return Collections.emptySet();
Review Comment:
This means that the root schema cannot contain tables. Can we add a comment
here?
--
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]