drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Julian Hyde <julianh...@gmail.com>
Subject Re: limit and count do odd things
Date Thu, 09 Apr 2015 05:25:57 GMT
Ted,

I'll forgive you (and anyone) the occasional intellectual lapse. I came across your wonderful
t-digest paper earlier today. 

https://github.com/tdunning/t-digest/raw/master/docs/t-digest-paper/histo.pdf

Julian 

> On Apr 8, 2015, at 20:20, Ted Dunning <ted.dunning@gmail.com> wrote:
> 
> Thanks.
> 
> Brain fart.
> 
>> On Wed, Apr 8, 2015 at 8:26 PM, Aman Sinha <asinha@maprtech.com> wrote:
>> 
>> Why ?  limit is applied to the final result set of the query.   If you did
>> select count(*) from (select * from T limit 3) you will get 3.
>> 
>>> On Wed, Apr 8, 2015 at 6:20 PM, Ted Dunning <ted.dunning@gmail.com> wrote:
>>> 
>>> Am I missing something?  It seems that count should return 3 in the
>> second
>>> query.
>>> 
>>> This happens with the 0.8.0 release running in embedded mode.
>>> 
>>> 
>>> 0: jdbc:drill:zk=local> select count(1) from
>>> dfs.`/Users/tdunning/tmp/apache-drill-0.8.0/foo/*`;
>>> +------------+
>>> |   EXPR$0   |
>>> +------------+
>>> | 20000      |
>>> +------------+
>>> 1 row selected (1.311 seconds)
>>> 0: jdbc:drill:zk=local> select count(*) from
>>> dfs.`/Users/tdunning/tmp/apache-drill-0.8.0/foo/*` limit 3;
>>> +------------+
>>> |   EXPR$0   |
>>> +------------+
>>> | 20000      |
>>> +------------+
>> 

Mime
  • Unnamed multipart/alternative (inline, 7-Bit, 0 bytes)
View raw message