drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Khurram Faraaz (JIRA)" <j...@apache.org>
Subject [jira] [Created] (DRILL-3630) error message needs to be fixed LEAD , LAG window functions
Date Wed, 12 Aug 2015 01:40:46 GMT
Khurram Faraaz created DRILL-3630:
-------------------------------------

             Summary: 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: Chris Westin
            Priority: Minor


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  | ZXXXXXXXXXXXXXXXXXXXXXXXXXCXXXXXXXXXXXXXXXXXXXXXXXXZ
 |
| ZXXXXXXXXXXXXXXXXXXXXXXXXXCXXXXXXXXXXXXXXXXXXXXXXXXZ  | AXXXXXXXXXXXXXXXXXXXXXXXXXCXXXXXXXXXXXXXXXXXXXX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CXXXXXXXXXXXXXXXXXXXXXXXXZ
 |
| QXXXXXXXXXXXXXXXXXXXXXXXXXCXXXXXXXXXXXXXXXXXXXXXXXXZ  | null                           
                      |
+-------------------------------------------------------+-------------------------------------------------------+
22 rows selected (0.245 seconds)
{code}



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

Mime
View raw message