drill-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Deneche A. Hakim (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (DRILL-3630) error message needs to be fixed LEAD , LAG window functions
Date Mon, 21 Sep 2015 19:55:04 GMT

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

Deneche A. Hakim updated DRILL-3630:
------------------------------------
    Fix Version/s:     (was: 1.2.0)
                   1.3.0

> error message needs to be fixed LEAD , LAG window functions
> -----------------------------------------------------------
>
>                 Key: DRILL-3630
>                 URL: https://issues.apache.org/jira/browse/DRILL-3630
>             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
>            Priority: Minor
>              Labels: window_function
>             Fix For: 1.3.0
>
>
> The error message says LEAD expects ONE input argument, however if you see in the other
query below, lead( col9 , 1 ) does not throw any error (as this is valid syntax and is supported).
Another case is, lead(col9,1,1) where we don't report any error being reported. We need to
fix the error message and handle inputs appropriately.
> {code}
> 0: jdbc:drill:schema=dfs.tmp> select col9 , lead(col9,1,0,1) over(partition by col7
order by col0) lead_col9 from FEWRWSPQQ_101;
> Error: PARSE ERROR: From line 1, column 15 to line 1, column 35: Invalid number of arguments
to function 'LEAD'. Was expecting 1 arguments
> [Error Id: 4a94487c-42e6-4672-978e-f011c997c537 on centos-03.qa.lab:31010] (state=,code=0)
> {code}
> {code}
> 0: jdbc:drill:schema=dfs.tmp> select col9 , lead(col9,1) over(partition by col7 order
by col0) lead_col9 from FEWRWSPQQ_101;
> +-------------------------------------------------------+-------------------------------------------------------+
> |                         col9                          |                       lead_col9
                      |
> +-------------------------------------------------------+-------------------------------------------------------+
> | OXXXXXXXXXXXXXXXXXXXXXXXXXCXXXXXXXXXXXXXXXXXXXXXXXXB  | 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XXXXXXXXXXXXXXCXXXXXXXXXXXXXXXXXXXXXXXXZ  | FXXXXXXXXXXXXXXXXXXXXXXXXXCXXXXXXXXXXXXXXXXXXXXXXXXB
 |
> | FXXXXXXXXXXXXXXXXXXXXXXXXXCXXXXXXXXXXXXXXXXXXXXXXXXB  | QXXXXXXXXXXXXXXXXXXXXXXXXXCXXXXXXXXXXXXXXXXXXXXXXXXZ
 |
> | QXXXXXXXXXXXXXXXXXXXXXXXXXCXXXXXXXXXXXXXXXXXXXXXXXXZ  | null                      
                           |
> +-------------------------------------------------------+-------------------------------------------------------+
> 22 rows selected (0.245 seconds)
> {code}



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

Mime
View raw message