diff options
author | bomeng <bmeng@us.ibm.com> | 2016-04-06 11:05:52 -0700 |
---|---|---|
committer | Andrew Or <andrew@databricks.com> | 2016-04-06 11:06:14 -0700 |
commit | 5abd02c02b3fa3505defdc8ab0c5c5e23a16aa80 (patch) | |
tree | 88ffa4ba214811f3242254bd280bed48bf463ede /dev/tests/pr_public_classes.sh | |
parent | 10494feae0c2c1aca545c73ba61af6d8f743c5bb (diff) | |
download | spark-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 'dev/tests/pr_public_classes.sh')
0 files changed, 0 insertions, 0 deletions