Bugs item #2430201, was opened at 2008-12-15 01:43
Message generated for change (Comment added) made by romulog
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=482468&aid=2430201&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: SQL CVS Head
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Stefan de Konink (skinkie)
Assigned to: Niels Nes (nielsnes)
Summary: Is distinct broken?

Initial Comment:
sql>select distinct way from way_tags group by way, k having count(*) > 1;
+----------+
| way      |
+==========+
| 23950375 |
| 23950375 |
| 23950375 |
| 23950375 |
| 23950375 |
| 24644162 |
| 24644162 |
| 24644162 |
+----------+
8 tuples

Is the above correct. Since I would expect it to only have two results. I guess 
what happens is that the distinct operates on the group by product instead of 
the selected output.

select distinct (select 10 union all select 10);
+--------------+
| single_value |
+==============+
|           10 |
|           10 |
+--------------+

opposed to:

sql>select distinct a from (select 10 as a union all select 10 as a) as b;
+----+
| a  |
+====+
| 10 |
+----+

----------------------------------------------------------------------

>Comment By: Romulo Goncalves (romulog)
Date: 2008-12-15 11:05

Message:
Test added:

sql/src/test/BugTracker-2008/Tests/is_distinct_broken.SF-2430201.sql

And I think this is a bug for SQL-CVS branch and not MonetDB5-CVS
branch... ;)

----------------------------------------------------------------------

Comment By: Romulo Goncalves (romulog)
Date: 2008-12-15 10:51

Message:
Without updating my sources, this means I do not have the fixes from Niels,
I can't reproduce the same output for this query:
(I did it for the current and stable branch...)
select distinct way from way_tags group by way, k having count(*) > 1;

% sys.way_tags # table_name
% way # name
% int # type
% 8 # length
[ 23950375      ]
[ 24644162      ]



----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=482468&aid=2430201&group_id=56967

------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
_______________________________________________
Monetdb-bugs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-bugs

Reply via email to