Fokko commented on code in PR #10498: URL: https://github.com/apache/iceberg/pull/10498#discussion_r1675399327
########## core/src/main/java/org/apache/iceberg/jdbc/JdbcCatalog.java: ########## @@ -466,6 +466,16 @@ public List<Namespace> listNamespaces(Namespace namespace) throws NoSuchNamespac Arrays.stream(n.levels()) .limit(subNamespaceLevelLength) .toArray(String[]::new))) + // exclude fuzzy matches when `namespace` contains `%` or `_` + .filter( + n -> { + for (int i = 0; i < namespace.levels().length; i++) { + if (!n.levels()[i].equals(namespace.levels()[i])) { + return false; + } + } + return true; + }) // remove duplicates .distinct() Review Comment: Swap it back: ```suggestion // remove duplicates .distinct() // exclude fuzzy matches when `namespace` contains `%` or `_` .filter( n -> { for (int i = 0; i < namespace.levels().length; i++) { if (!n.levels()[i].equals(namespace.levels()[i])) { return false; } } return true; }) ``` -- 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: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org