Bugs item #2926454, was opened at 2010-01-05 21:20
Message generated for change (Comment added) made by sjoerd
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=482468&aid=2926454&group_id=56967
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: SQL/Core
Group: MonetDB5 "stable"
Status: Open
Resolution: None
Priority: 4
Private: No
Submitted By: Makoto YUI (yuin405)
>Assigned to: Niels Nes (nielsnes)
Summary: Error on "rank() over (order by sum(.."
Initial Comment:
The following query causes "SELECT: subquery result missing" error and server
crashes on Nov2009-SP1/Linux X86-64.
select
s_name,
sum(score) as totalscore,
rank() over (order by sum(score) desc) -- cannot use alias 'totalscore' here
from score_table
group by s_name
-- preparation
create table score_table (
s_name varchar(20),
subject varchar(10),
score int
);
insert into score_table values('foo','english',70);
insert into score_table values('foo','history',50);
insert into score_table values('foo','math',60);
insert into score_table values('bar','english',45);
insert into score_table values('bar','history',75);
Slightly related discussion (though the issue is aggregation in group-by) is
found in
http://markmail.org/thread/33hxthbvr7csb66o
-- Note then that the following expression works properly.
select
s_name,
sum(score),
from score_table
group by s_name
order by sum(score) desc
----------------------------------------------------------------------
>Comment By: Sjoerd Mullender (sjoerd)
Date: 2010-04-16 17:08
Message:
Added a test in sql: src/test/BugTracker-2010 rank-over-crash.SF-2926454.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=482468&aid=2926454&group_id=56967
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Monetdb-bugs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-bugs