You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Bo Meng (JIRA)" <ji...@apache.org> on 2016/04/04 23:27:25 UTC

[jira] [Comment Edited] (SPARK-14323) [SQL] SHOW FUNCTIONS did not work properly

    [ 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-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org