You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues-all@impala.apache.org by "Tim Armstrong (Jira)" <ji...@apache.org> on 2020/06/19 19:03:00 UTC

[jira] [Updated] (IMPALA-3744) Pattern making in "show ... like ..." behaves differently from Hive

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

Tim Armstrong updated IMPALA-3744:
----------------------------------
    Summary: Pattern making in "show ... like ..." behaves differently from Hive  (was: "show ... like ..." does not work reasonably)

> Pattern making in "show ... like ..." behaves differently from Hive
> -------------------------------------------------------------------
>
>                 Key: IMPALA-3744
>                 URL: https://issues.apache.org/jira/browse/IMPALA-3744
>             Project: IMPALA
>          Issue Type: Bug
>          Components: Frontend
>    Affects Versions: Impala 2.6.0
>            Reporter: Huaisi Xu
>            Priority: Minor
>              Labels: incompatibility, newbie
>
> In impala:
> {code:java}
> [localhost:21000] > show tables;
> Query: show tables
> +------+
> | name |
> +------+
> | a    |
> | aa   |
> | aaa  |
> +------+
> Fetched 3 row(s) in 0.01s
> [localhost:21000] > show tables like "a";
> Query: show tables like "a"
> +------+
> | name |
> +------+
> | a    |
> +------+
> Fetched 1 row(s) in 0.01s
> [localhost:21000] > show tables like "a_";
> Query: show tables like "a_"
> Fetched 0 row(s) in 0.01s
> [localhost:21000] > show tables like "a%";                                                                                                                                                                                                                                                 
> Query: show tables like "a%"
> Fetched 0 row(s) in 0.00s
> [localhost:21000] > show tables like "a.";                                                                                                                                                                                                                                                 
> Query: show tables like "a."
> Fetched 0 row(s) in 0.00s
> [localhost:21000] > show tables like "a*";
> Query: show tables like "a*"
> +------+
> | name |
> +------+
> | a    |
> | aa   |
> | aaa  |
> +------+
> Fetched 3 row(s) in 0.01s
> {code}
> In Hive:
> {code:java}
> hive> show tables;
> OK
> a
> aa
> aaa
> Time taken: 0.013 seconds, Fetched: 3 row(s)
> hive> show tables like "a";
> OK
> a
> Time taken: 0.012 seconds, Fetched: 1 row(s)
> hive> show tables like "a_";
> OK
> aa
> Time taken: 0.014 seconds, Fetched: 1 row(s)
> hive> show tables like "a%";
> OK
> a
> aa
> aaa
> Time taken: 0.014 seconds, Fetched: 3 row(s)
> hive> show tables like "a.";
> OK
> aa
> Time taken: 0.011 seconds, Fetched: 1 row(s)
> hive> show tables like "a*";
> OK
> a
> aa
> aaa
> Time taken: 0.015 seconds, Fetched: 3 row(s)
> {code}
> The problem seems to be http://github.mtv.cloudera.com/CDH/Impala/blob/cdh5-trunk/fe/src/main/java/com/cloudera/impala/util/PatternMatcher.java
> It is very confusing to have two pattern matcher.. we use Hive pattern matcher in this case, but it escapes ".", which is a bit surprising.
> Solution is to only use JdbcPatternMatcher, but this may break our API.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-all-unsubscribe@impala.apache.org
For additional commands, e-mail: issues-all-help@impala.apache.org