[ 
https://issues.apache.org/jira/browse/SPARK-14323?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15225083#comment-15225083
 ] 

Bo Meng edited comment on SPARK-14323 at 4/4/16 9:26 PM:
---------------------------------------------------------

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 currently did not use it, thus cause the test 
cases fail. By using listFunctions() in SessionCatalog, the problem should be 
resolved.
That will be happened in another SPARK-14123.


was (Author: bomeng):
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 currently did not use it, thus cause the test cases fail. By 
using listFunctions() in SessionCatalog, the problem should be resolved.
That will be happened in another SPARK-14123.

> [SQL] SHOW FUNCTIONS did not work properly
> ------------------------------------------
>
>                 Key: SPARK-14323
>                 URL: https://issues.apache.org/jira/browse/SPARK-14323
>             Project: Spark
>          Issue Type: Bug
>            Reporter: Bo Meng
>            Priority: Minor
>
> Show Functions syntax can be found here:
> https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DDL#LanguageManualDDL-ShowFunctions
> When use "*" in the LIKE clause, it will not return the expected results. 
> This is because "\*" did not get escaped before passing to the regex. If we 
> do not escape "\*", for example, pattern "\*f\*", it will cause exception 
> (PatternSyntaxException, Dangling meta character) and thus return empty 
> result.
> try this: 
> val p = "\*f\*".r



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org

Reply via email to