kkhatua commented on issue #1608: DRILL-6960: AutoLimit the size of ResultSet 
for a WebUI (or REST) client
URL: https://github.com/apache/drill/pull/1608#issuecomment-461893168
 
 
   Tested for the following queries with Limit = 13
   
   ```sql
   --ShowDatabases [Expected: NoLimit on SQL]
   show databases
   
   --SqlKind: WITH [Expected: Limit applied to SQL]
   with X1 (r_regionkey, r_name, n_nationkey, n_name) as 
     (select r.r_regionkey as r_regionkey, r.r_name as r_name, n.n_nationkey as 
n_nationkey, n.n_name as n_name from dfs.par100.region r, dfs.par100.nation n 
where r.r_regionkey=n.n_regionkey)
    select X1.n_name as nation, X1.r_name as region, count(*) as tally 
     from X1, dfs.par100.customer c 
     where X1.n_nationkey = c.c_nationkey
     group by X1.n_name, X1.r_name
     order by tally
   
   --SqlKind: ORDER_BY [Expected: Limit applied to SQL]
   select r.r_name as region, n.n_name as nation
    , count(*) as tally 
     from dfs.par100.region r, dfs.par100.nation n 
     where r.r_regionkey=n.n_regionkey
     group by n.n_name, r.r_name
     order by tally
   
   -- SqlKind: UNION outputting 30 rows [Expected: Limit applied to SQL]
   select r_name as name, r_regionkey as code from dfs.par100.region
   UNION
   select n_name as name, n_nationkey as code from dfs.par100.nation 
   
   -- Simple Join outputting 25 rows [Expected: Limit applied to SQL]
   select r.r_regionkey as r_regionkey, r.r_name as r_name, n.n_nationkey as 
n_nationkey, n.n_name as n_name from dfs.par100.region r, dfs.par100.nation n 
where r.r_regionkey=n.n_regionkey
   
   -- Huge Join outputting 600M rows [Expected: Limit applied to SQL and 4-node 
execution in <2 minutes]
   select * from dfs.par100.lineitem l, dfs.par100.orders o where o.o_orderkey 
= l.l_orderkey;
   
   -- Simple Join with existing Limit 22 [Expected: Limit 13 applied to SQL]
   select r.r_regionkey as r_regionkey, r.r_name as r_name, n.n_nationkey as 
n_nationkey, n.n_name as n_name from dfs.par100.region r, dfs.par100.nation n 
where r.r_regionkey=n.n_regionkey limit 22
   
   -- Simple Join with existing Limit 11 [Expected: NoLimit on SQL]
   select r.r_regionkey as r_regionkey, r.r_name as r_name, n.n_nationkey as 
n_nationkey, n.n_name as n_name from dfs.par100.region r, dfs.par100.nation n 
where r.r_regionkey=n.n_regionkey limit 11
   
   --CreateTable [Expected: NoLimit on SQL]
   create temporary table dummy ( nation )  as 
   select n_name from dfs.par100.nation
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to