[ 
https://issues.apache.org/jira/browse/DRILL-3633?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14694268#comment-14694268
 ] 

Deneche A. Hakim commented on DRILL-3633:
-----------------------------------------

[~inramana] It's a different query but both queries have FIRST_VALUE computed 
as part of their plan, I think it's good enough knowing that without the 
count(*) the query would actually take less time.

[~khfaraaz] looking at the 2nd query, the execution time doesn't look that bad, 
I'm marking this issue as invalid until we are sure FIRST_VALUE is really 
taking too much time

> FIRST_VALUE , LAST_VALUE functions take too long to complete
> ------------------------------------------------------------
>
>                 Key: DRILL-3633
>                 URL: https://issues.apache.org/jira/browse/DRILL-3633
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Execution - Flow
>    Affects Versions: 1.2.0
>         Environment: private-branch 
> https://github.com/adeneche/incubator-drill/tree/new-window-funcs
>            Reporter: Khurram Faraaz
>            Assignee: Deneche A. Hakim
>              Labels: window_funcion
>
> Query that uses FIRST_VALUE function takes twelve minutes to complete on 
> developers private branch.
> {code}
> select first_value(key1) over(partition by key2 order by key1) firstValue 
> from `twoKeyJsn.json`; 
> ...
> 26,212,355 rows selected (720.229 seconds)
> 0: jdbc:drill:schema=dfs.tmp> 
> {code}
> {code}
> select last_value(key1) over(partition by key2 order by key1) firstValue from 
> `twoKeyJsn.json`; 
> ...
> +------------------+
> 26,212,355 rows selected (239.109 seconds)
> {code}
> number of rows in the JSON file
> {code}
> 0: jdbc:drill:schema=dfs.tmp> select count(*) from `twoKeyJsn.json`;
> +-----------+
> |  EXPR$0   |
> +-----------+
> | 26212355  |
> +-----------+
> 1 row selected (13.949 seconds)
> {code}



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

Reply via email to