Bugs item #2430201, was opened at 2008-12-15 00:43 Message generated for change (Comment added) made by nielsnes 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: Closed >Resolution: Fixed 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: Niels Nes (nielsnes) Date: 2008-12-27 14:47 Message: fixed the distinct operator ---------------------------------------------------------------------- Comment By: Romulo Goncalves (romulog) Date: 2008-12-15 10: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 09: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 ------------------------------------------------------------------------------ _______________________________________________ Monetdb-bugs mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/monetdb-bugs
