Github user bomeng commented on a diff in the pull request:

    https://github.com/apache/spark/pull/12104#discussion_r58451085
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/catalog/InMemoryCatalog.scala
 ---
    @@ -48,7 +48,7 @@ class InMemoryCatalog extends ExternalCatalog {
       private val catalog = new scala.collection.mutable.HashMap[String, 
DatabaseDesc]
     
       private def filterPattern(names: Seq[String], pattern: String): 
Seq[String] = {
    -    val regex = pattern.replaceAll("\\*", ".*").r
    +    val regex = pattern.replaceAll("\\.\\*", "\\*").replaceAll("\\*", 
"\\.\\*").r
    --- End diff --
    
    I did a deep investigation of pattern matching for LIKE in show 
tables/functions. Here is what I found: Hive only supports \* and | as 
wildcards. Use ".\*" to replace "\*" is right. The only issue is 
ShowFunctions() in commands.scala did not use it, thus cause the test cases 
fail. By using listFunctions() in SessionCatalog, the problem should be 
resolved. Thanks.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to