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, 林春晓 <[email protected]> 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 林春晓 <[email protected]>: > > > 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 林春晓 <[email protected]>: > > > >> 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。 > >> > > > > >
