db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dag H. Wanvik (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DERBY-6565) ROW_NUMBER function throws NullPointerException in UPDATE statement
Date Tue, 05 Aug 2014 00:41:12 GMT

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

Dag H. Wanvik commented on DERBY-6565:
--------------------------------------

I have looked at this issue, and it seems that the problem is that the rewrite of the ROW_LOCATION
function in the query optimization phase of the SELECT node into a ProjectRestrictNode just
isn't prepared for being part of an UPDATE statement. So, it is a mini-project to implement
ROW_LOCATION for UPDATE: a) Modify the query tree re-write in the optimization phase to handle
the simultaneous presence of UPDATE and ROW LOCATION, b) modify the code generation, and c)
possibly some changes to the run-time result sets to accommodate that an update result set
may also contain a WindowResultSet.


> ROW_NUMBER function throws NullPointerException in UPDATE statement
> -------------------------------------------------------------------
>
>                 Key: DERBY-6565
>                 URL: https://issues.apache.org/jira/browse/DERBY-6565
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.10.2.0
>            Reporter: Knut Anders Hatlen
>            Priority: Minor
>
> A NullPointerException is raised with this (possibly illegal?) UPDATE statement:
> {noformat}
> ij version 10.10
> ij> connect 'jdbc:derby:memory:db;create=true';
> ij> create table t(x int);
> 0 rows inserted/updated/deleted
> ij> insert into t values 1;
> 1 row inserted/updated/deleted
> ij> update t set x = row_number() over ();
> ERROR XJ001: Java exception: ': java.lang.NullPointerException'.
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message