You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Deneche A. Hakim (JIRA)" <ji...@apache.org> on 2014/12/31 02:09:13 UTC

[jira] [Commented] (DRILL-1910) ROW_NUMBER() window function throws exception during execution

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

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

Looking at the logs I see the following exception:
{code}
...
java.lang.AssertionError
at org.eigenbase.sql.validate.SqlValidatorUtil.lookup(SqlValidatorUtil.java:242) 
at org.eigenbase.sql.SqlIdentifier.getMonotonicity(SqlIdentifier.java:261) 
...
{code}

It's actually caused by the missing order by clause in the over clause and It's related to DRILL-1852.

Adding an order by clause to the over clause displays a more informative error message:
{code}
...> select a1, row_number() over (partition by a1 order by a1) from dfs.data.`t.json`;
Query failed: Query stopped., Failure while materializing expression. 
Error in expression at index -1.  Error: Missing function implementation: [row_number(BIGINT-REQUIRED)].  Full expression: --UNKNOWN EXPRESSION--. [ 6381e5b2-aada-4ac3-a90f-c27a94241ebc on 192.168.11.215:31010 ]

Error: exception while executing query: Failure while executing query. (state=,code=0)
{code}

> ROW_NUMBER() window function throws exception during execution
> --------------------------------------------------------------
>
>                 Key: DRILL-1910
>                 URL: https://issues.apache.org/jira/browse/DRILL-1910
>             Project: Apache Drill
>          Issue Type: New Feature
>          Components: Functions - Drill
>    Affects Versions: 0.8.0
>            Reporter: Victoria Markman
>
> Window function ROW_NUMBER() is currently:
>         * Supported in Calcite
>         * Not supported in DRILL
>         * Not documented in DRILL documentation
> It throws exception during execution:
> {code}
> 0: jdbc:drill:schema=dfs> select a1, row_number() over (partition by a1) from `t.json`;
> Query failed: Query failed: Unexpected exception during fragment initialization: null
> Error: exception while executing query: Failure while executing query. (state=,code=0)
> 0: jdbc:drill:schema=dfs> select a1, row_number() over () from `t.json`;
> Query failed: Query failed: Unexpected exception during fragment initialization: null
> Error: exception while executing query: Failure while executing query. (state=,code=0)
> {code}
> According to Jira, DRILL-1487 is targeted for 0.8.0 release.
> DRILL-1902 is marked as critical bug as well.
> We have two options:
>         1) Make this function work for 0.8.0
>         2) Throw unsupported error message in 0.8.0 and implement row_number() later
> If we decide to go with option #1, can we please file a separate bug for error message 
> in 0.8.0 and turn  this one into an enhancement request.
> {code}
> drill 0.8.0
> git.commit.id.abbrev=5f70ba1 
> {code}



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