Return-Path: X-Original-To: apmail-db-derby-dev-archive@www.apache.org Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E93D8DB9C for ; Wed, 17 Oct 2012 15:32:03 +0000 (UTC) Received: (qmail 59501 invoked by uid 500); 17 Oct 2012 15:32:03 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 59451 invoked by uid 500); 17 Oct 2012 15:32:03 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 59310 invoked by uid 99); 17 Oct 2012 15:32:03 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 17 Oct 2012 15:32:03 +0000 Date: Wed, 17 Oct 2012 15:32:03 +0000 (UTC) From: "Rick Hillegas (JIRA)" To: derby-dev@db.apache.org Message-ID: <1064628345.58110.1350487923567.JavaMail.jiratomcat@arcas> In-Reply-To: <1503509585.57712.1350481323453.JavaMail.jiratomcat@arcas> Subject: [jira] [Commented] (DERBY-5954) NPE in SELECT involving subselects and windows functions MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/DERBY-5954?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13477957#comment-13477957 ] Rick Hillegas commented on DERBY-5954: -------------------------------------- The user reports: "NOTE: I have tested this with Derby 10.5, 10.8 and 10.9 The queries *work with Derby 10.5* ; but fail with 10.8 and 10.9" > NPE in SELECT involving subselects and windows functions > -------------------------------------------------------- > > Key: DERBY-5954 > URL: https://issues.apache.org/jira/browse/DERBY-5954 > Project: Derby > Issue Type: Bug > Components: SQL > Affects Versions: 10.10.0.0 > Reporter: Rick Hillegas > > A user reports and I have verified an NPE on the following SELECT: > connect 'jdbc:derby:memory:db;create=true'; > create table blah ( a int ); > insert into blah values (1), (2), (3), (4), (5), (6), (7); > SELECT rn, (SELECT rn FROM (SELECT row_number() over() rn FROM blah ) as T2 > where T2.rn = T1.rn+1) rn2 > FROM (SELECT row_number() over() rn from blah) as T1; -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira