aboutsummaryrefslogtreecommitdiff
path: root/project
diff options
context:
space:
mode:
authorbomeng <bmeng@us.ibm.com>2016-04-06 11:05:52 -0700
committerAndrew Or <andrew@databricks.com>2016-04-06 11:06:14 -0700
commit5abd02c02b3fa3505defdc8ab0c5c5e23a16aa80 (patch)
tree88ffa4ba214811f3242254bd280bed48bf463ede /project
parent10494feae0c2c1aca545c73ba61af6d8f743c5bb (diff)
downloadspark-5abd02c02b3fa3505defdc8ab0c5c5e23a16aa80.tar.gz
spark-5abd02c02b3fa3505defdc8ab0c5c5e23a16aa80.tar.bz2
spark-5abd02c02b3fa3505defdc8ab0c5c5e23a16aa80.zip
[SPARK-14429][SQL] Improve LIKE pattern in "SHOW TABLES / FUNCTIONS LIKE <pattern>" DDL
LIKE <pattern> is commonly used in SHOW TABLES / FUNCTIONS etc DDL. In the pattern, user can use `|` or `*` as wildcards. 1. Currently, we used `replaceAll()` to replace `*` with `.*`, but the replacement was scattered in several places; I have created an utility method and use it in all the places; 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. 3. Combined with `|`, the result will be sorted. For pattern like `' B*|a* '`, it will list the result in a-b order. I've made some changes to the utility method to make sure we will get the same result as Hive does. A new method was created in StringUtil and test cases were added. andrewor14 Author: bomeng <bmeng@us.ibm.com> Closes #12206 from bomeng/SPARK-14429.
Diffstat (limited to 'project')
0 files changed, 0 insertions, 0 deletions