drill-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dechang Gu <...@maprtech.com>
Subject Re: drill return count(*) is wrong
Date Wed, 21 Dec 2016 17:46:50 GMT
I tried something similar to your query, the result looks correct to me:

0: jdbc:drill:schema=dfs.tpchPar100> select  t.n, count(*) cnt from (select
distinct c_address addr, c_nationkey n from customer limit 10) t group by
t.n;

*+-----+------+*

*| ** n ** | **cnt ** |*

*+-----+------+*

*| *7  * | *1   * |*

*| *9  * | **3  * * |*

*| *11 * | *1   * |*

*| *12 * | *1   * |*

*| *15 * | *1   * |*

*| *17 * | *1   * |*

*| *19 * | *1   * |*

*| *20 * | *1   * |*

*+-----+------+*

8 rows selected (2.803 seconds)

How big (#rows)  is your table?


Thanks,
Dechang

On Wed, Dec 21, 2016 at 3:28 AM, 林春晓 <lincx0128@gmail.com> wrote:

> sorry ,update last mail sql:select t.b, count (*) the from (select distinct
> columns [4] a, columns[5] m, columns [6] b, columns[7] c, columns [8] d
> from hdfs.`/ott_raw_data/8/2016/12/20161202.txt`) t group by t.b
>
> 2016-12-21 19:19 GMT+08:00 林春晓 <lincx0128@gmail.com>:
>
> > Hello,
> > I upgrade to V1.9.0 from V1.4.0 today, found that using the query
> > statements (select t.b, count (1) the from (select distinct columns [4]
> a,
> > columns, [5] m columns [6] b, columns, [7] c columns [8] d from hdfs.`
> > /2016/12/20161202.txt `) t group by t.b) return all statistics is 1, the
> > result is actually wrong. how to solve the problem?thanks!
> >
> > ps: the columns[6] is time type, for example: 00:00:12。
> >
> > 2016-12-21 19:17 GMT+08:00 林春晓 <lincx0128@gmail.com>:
> >
> >> Hello,
> >> I upgrade to V1.9.0 from V1.4.0 today, found that using the query
> >> statements (select t.b, count (1) the from (select distinct columns [4]
> a,
> >> columns, [5] m columns [6] b, columns, [7] c columns [8] d from hdfs.`
> >> /2016/12/20161202.txt `) t group by t.b) return all statistics is 1, the
> >> result is actually wrong. how to solve the problem?thanks!
> >>
> >> ps: the columns[6] is time type, for example: 00:00:12。
> >>
> >
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message