drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Deneche A. Hakim (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (DRILL-2281) Drill never returns when we use aggregate functions after a join with an order by
Date Fri, 15 May 2015 17:41:00 GMT

     [ https://issues.apache.org/jira/browse/DRILL-2281?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Deneche A. Hakim resolved DRILL-2281.
-------------------------------------
       Resolution: Fixed
    Fix Version/s:     (was: 1.1.0)
                   1.0.0

Tried on 1.0.0 and the query worked fine:
{noformat}
0: jdbc:drill:zk=local> select v1.uid, MAX(v2.transaction.amount), MIN(v1.event.event_time)
from v1 inner join v2 on v1.uid = v2.uid where v2.transaction.trans_time < 0 group by v1.uid
order by v1.uid;
+------+---------+---------+
| uid  | EXPR$1  | EXPR$2  |
+------+---------+---------+
+------+---------+---------+
No rows selected (6.414 seconds)
{noformat}

> Drill never returns when we use aggregate functions after a join with an order by
> ---------------------------------------------------------------------------------
>
>                 Key: DRILL-2281
>                 URL: https://issues.apache.org/jira/browse/DRILL-2281
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Execution - Relational Operators
>            Reporter: Rahul Challapalli
>            Assignee: Deneche A. Hakim
>             Fix For: 1.0.0
>
>         Attachments: data.json
>
>
> git.commit.id.abbrev=6676f2d
> The below query never returns : (Order by seems to be the culprit)
> {code}
> create view v1 as select uid, flatten(events) event from `data.json`;
> create view v2 as select uid, flatten(transactions) transaction from `data.json`;
> select v1.uid, MAX(v2.transaction.amount), MIN(v1.event.event_time) from v1 inner join
v2 on v1.uid = v2.uid where v2.transaction.trans_time < 0 group by v1.uid order by v1.uid;
> {code}
> There seems to be constant activity in the drillbit.log file. The below message is continuously
displayed in the log file
> {code}
> 2015-02-20 23:35:04,450 [2b183b65-4551-bb9a-35ca-b71b9eedc4d6:frag:1:2] INFO  o.a.d.exec.vector.BaseValueVector
- Realloc vector null. [32768] -> [65536]
> 2015-02-20 23:35:04,451 [2b183b65-4551-bb9a-35ca-b71b9eedc4d6:frag:1:2] INFO  o.a.d.exec.vector.BaseValueVector
- Realloc vector null. [32768] -> [65536]
> 2015-02-20 23:35:04,451 [2b183b65-4551-bb9a-35ca-b71b9eedc4d6:frag:1:2] INFO  o.a.d.exec.vector.BaseValueVector
- Realloc vector null. [32768] -> [65536]
> {code}
> Drill returns correct data when we remove one of the agg functions or use multiple aggs
from the same side of the join. The below queries work :
> {code}
>  select v1.uid, MAX(v2.transaction.amount) from v1 inner join v2 on v1.uid = v2.uid where
v2.transaction.trans_time < 0 group by v1.uid order by v1.uid;
>  select v1.uid, MAX(v2.transaction.amount), MAX(v2.transaction.amount) from v1 inner
join v2 on v1.uid = v2.uid where v2.transaction.trans_time < 0 group by v1.uid order by
v1.uid;
> {code}
> Attached the dataset which contains 2 records. I copied over the same 2 records 50000
times and ran the queries on the data set. Let me know if you need anything else.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message