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 A6FEAD8C3 for ; Wed, 17 Oct 2012 13:42:03 +0000 (UTC) Received: (qmail 8966 invoked by uid 500); 17 Oct 2012 13:42:03 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 8933 invoked by uid 500); 17 Oct 2012 13:42: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 8924 invoked by uid 99); 17 Oct 2012 13:42: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 13:42:03 +0000 Date: Wed, 17 Oct 2012 13:42:02 +0000 (UTC) From: "Rick Hillegas (JIRA)" To: derby-dev@db.apache.org Message-ID: <1503509585.57712.1350481323453.JavaMail.jiratomcat@arcas> Subject: [jira] [Created] (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 Rick Hillegas created DERBY-5954: ------------------------------------ Summary: 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