You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@hive.apache.org by "deniskuzZ (via GitHub)" <gi...@apache.org> on 2024/09/14 08:27:32 UTC

Re: [PR] HIVE-28292: Optimize SHOW TABLES|VIEWS statements [hive]

deniskuzZ commented on code in PR #5273:
URL: https://github.com/apache/hive/pull/5273#discussion_r1759696055


##########
ql/src/java/org/apache/hadoop/hive/ql/metadata/SessionHiveMetaStoreClient.java:
##########
@@ -321,7 +321,7 @@ public List<String> getTables(String dbName, String tablePattern) throws MetaExc
     if (tables == null || tables.size() == 0) {
       return tableNames;
     }
-    tablePattern = tablePattern.replaceAll("\\*", ".*");
+    tablePattern = tablePattern.replaceAll("\\.\\*", "\\*").replaceAll("\\*", ".*");

Review Comment:
   @wecharyu, could we replace it with `tablePattern.replaceAll("(?<!\\.)\\*", ".*")` ?



-- 
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: gitbox-unsubscribe@hive.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org