Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 26459 invoked from network); 3 Mar 2008 19:13:58 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 3 Mar 2008 19:13:58 -0000 Received: (qmail 10609 invoked by uid 500); 3 Mar 2008 19:13:53 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 10569 invoked by uid 500); 3 Mar 2008 19:13:53 -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 10555 invoked by uid 99); 3 Mar 2008 19:13:53 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 03 Mar 2008 11:13:53 -0800 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 03 Mar 2008 19:13:26 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id BD295234C094 for ; Mon, 3 Mar 2008 11:12:50 -0800 (PST) Message-ID: <2145048890.1204571570773.JavaMail.jira@brutus> Date: Mon, 3 Mar 2008 11:12:50 -0800 (PST) From: "Thomas Nielsen (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Commented: (DERBY-2998) Add support for ROW_NUMBER() window function In-Reply-To: <14732006.1186647103190.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/DERBY-2998?page=3Dcom.atlassian= .jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D1257= 4678#action_12574678 ]=20 Thomas Nielsen commented on DERBY-2998: --------------------------------------- Army> "pointsToWindowFunction()" in ColumnReference.java is no longer calle= d. Would it make sense to remove the method altogether?=20 Yes - it should be removed. Will fix tomorrow. Army> .... And if so, do you happen to know if this change to RealDistinct= ScanStatistics will still be needed after the DISTINCT issue is resolved? Fixing the distinct with a window function issue will result in placing the= distinct node on top of the window node(s). Today it's the other way aroun= d. To do so involves explicitly doing a normal scan and a distinct sort - l= ike you say. So, yes, we might not actually need it - please don't commit i= t yet. I'll start on the distinct fix tomorrow. The fix I tried in my sandbox work= ed for non-nested queries, but not when there's a subquery with a window fu= nction. This resulted in incorrect results being returned. Looked like a co= lumn mapping issue in the distinct node from the couple of alternative quer= ies I tried without a window function. I know where to start looking at lea= st :) > Add support for ROW_NUMBER() window function > -------------------------------------------- > > Key: DERBY-2998 > URL: https://issues.apache.org/jira/browse/DERBY-2998 > Project: Derby > Issue Type: Sub-task > Components: SQL > Reporter: Thomas Nielsen > Assignee: Thomas Nielsen > Priority: Minor > Attachments: d2998-10.diff, d2998-10.stat, d2998-11.diff, d2998-1= 2.diff, d2998-12.stat, d2998-13.diff, d2998-13.stat, d2998-14.diff, d2998-1= 4.stat, d2998-15.diff, d2998-15.stat, d2998-16.diff, d2998-16.stat, d2998-1= 7.diff, d2998-17.stat, d2998-18.diff, d2998-18.stat, d2998-19.diff, d2998-1= 9.stat, d2998-4.diff, d2998-4.stat, d2998-5.diff, d2998-5.stat, d2998-6.dif= f, d2998-6.stat, d2998-7.diff, d2998-7.stat, d2998-8.diff, d2998-8.stat, d2= 998-9-derby.log, d2998-9.diff, d2998-9.stat, d2998-doc-1.diff, d2998-doc-1.= stat, d2998-doc-2.diff, d2998-doc-2.stat, d2998-followup-2.diff, d2998-foll= owup-2.stat, d2998-followup-issue1.diff, d2998-followup-issue1.stat, d2998-= followup-issue4.diff, d2998-followup-issue4.stat, d2998-followup-queryplanA= OOB.diff, d2998-followup-queryplanAOOB.stat, d2998-followup-testsuite.diff,= d2998-followup-testsuite.stat, d2998-test.diff, d2998-test.stat, d2998-tes= t2.diff, d2998-test2.stat, d2998-test3.diff, d2998-test3.stat, d2998-test4.= diff, d2998-test4.stat, d2998-test6.diff, d2998-test7.diff, d2998-test8.dif= f, d2998-test9.diff > > > As part of implementing the overall OLAP Operations features of SQL (DERB= Y-581), implement the ROW_NUMBER() window function. > More information about this feature is available at http://wiki.apache.or= g/db-derby/OLAPRowNumber --=20 This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.