[ 
https://issues.apache.org/jira/browse/SPARK-14429?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Bo Meng updated SPARK-14429:
----------------------------
    Description: 
LIKE <pattern> is commonly used in {code:SQL} SHOW TABLES / FUNCTIONS {code} 
etc DDL. In the pattern, user can use `|` or `\*` as wildcards.

I'd like to address a few issues in this JIRA.
1. Currently, we used `replaceAll()` to replace `\*` with `.\*`, but the 
replacement was scattered in several places; it is good to have one place to do 
the same thing;
2. Consistency with Hive: the pattern is case insensitive in Hive and white 
spaces will be trimmed, but current pattern matching does not do that. For 
example, suppose we have tables (t1, t2, t3), {panel}`SHOW TABLES LIKE '  T*  ' 
`{panel} will list all the t-tables. Please use Hive to verify it.

  was:
LIKE <pattern> is commonly used in {code:SQL} SHOW TABLES / FUNCTIONS {code} 
etc DDL. In the pattern, user can use `|` or `\*` as wildcards.

I'd like to address a few issues in this JIRA.
1. Currently, we used `replaceAll()` to replace `\*` with `.\*`, but the 
replacement was scattered in several places; it is good to have one place to do 
the same thing;
2. Consistency with Hive: the pattern is case insensitive in Hive and white 
spaces will be trimmed, but current pattern matching does not do that. For 
example, suppose we have tables (t1, t2, t3), `SHOW TABLES LIKE '  T*  ' ` will 
list all the t-tables. Please use Hive to verify it.


> Revisit LIKE pattern in "SHOW TABLES / FUNCTIONS LIKE <pattern>" DDL
> --------------------------------------------------------------------
>
>                 Key: SPARK-14429
>                 URL: https://issues.apache.org/jira/browse/SPARK-14429
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>            Reporter: Bo Meng
>            Priority: Minor
>
> LIKE <pattern> is commonly used in {code:SQL} SHOW TABLES / FUNCTIONS {code} 
> etc DDL. In the pattern, user can use `|` or `\*` as wildcards.
> I'd like to address a few issues in this JIRA.
> 1. Currently, we used `replaceAll()` to replace `\*` with `.\*`, but the 
> replacement was scattered in several places; it is good to have one place to 
> do the same thing;
> 2. Consistency with Hive: the pattern is case insensitive in Hive and white 
> spaces will be trimmed, but current pattern matching does not do that. For 
> example, suppose we have tables (t1, t2, t3), {panel}`SHOW TABLES LIKE '  T*  
> ' `{panel} will list all the t-tables. Please use Hive to verify it.



--
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