You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "闫昆 (JIRA)" <ji...@apache.org> on 2014/04/01 05:50:16 UTC
[jira] [Created] (HIVE-6803) Hive mutil group by results are not
normal
闫昆 created HIVE-6803:
------------------------
Summary: Hive mutil group by results are not normal
Key: HIVE-6803
URL: https://issues.apache.org/jira/browse/HIVE-6803
Project: Hive
Issue Type: Bug
Components: Query Processor
Affects Versions: 0.9.0
Reporter: 闫昆
Hi all
I'm learning hive,I am by looking at the following two SQL syntax tree , there is a problem。
predicate:
expr: ((qq rlike '.*(baidu).*') or (qq rlike '.*(sina).*'))
type: boolean
explain from telno_qq
insert overwrite local directory '/tmp/s' select telno,count(1) where qq RLIKE '.*(baidu).*' group by telno
insert overwrite local directory '/tmp/d' select telno,count(1) where qq RLIKE '.*(sina).*' group by telno;
predicate:
expr: (qq rlike '.*(baidu).*')
type: boolean
predicate:
expr: (qq rlike '.*(sina).*')
type: boolean
explain from telno_qq
insert overwrite local directory '/tmp/s' select telno where qq RLIKE '.*(baidu).*'
insert overwrite local directory '/tmp/d' select telno where qq RLIKE '.*(sina).*' ;
The first query plan will satisfy the conditions of the two select data into / tmp / s and / tmp / d them, but actually I just want to / tmp / s data exist only baidu , / tmp / d exists only sina data . But the result is to meet or sina baidu records are placed in / tmp / s and / tmp / d both of them went to the temporary directory .
The second query plan is right , and the query result is correct
--
This message was sent by Atlassian JIRA
(v6.2#6252)