drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aman Sinha <asi...@maprtech.com>
Subject Re: limit and count do odd things
Date Thu, 09 Apr 2015 01:26:08 GMT
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, None, 0 bytes)
View raw message