× Heads up!

Aqua Data Studio / nhilam

Follow
IDE for Relational Databases
×
Umairpk reported 2013-05-09T22:31:36Z  · tariqrahiman last modified 2013-07-15T17:27:25Z

union all returns distinct rows if used in derived table


Priority Low
Complexity Unknown
Component MongoSQL
Version 14.0

 

-------------Test script-------------
------ 
create collection uniontest
GO
insert into uniontest
(id) values(1)
GO
insert into uniontest
(id) values(1)
GO
insert into uniontest
(id) values(1)
 
-------
GO
 
select * from(
select * from uniontest
union
select * from uniontest)
---It returns distinct rows as it should
GO
select * from uniontest
union all
select * from uniontest
--6 rows returned thats normal
GO
select * from(
select * from uniontest
union all
select * from uniontest)
--3 rows returned however 6 rows should have returned because derived table property is just to return rows without applying distinct, here its behaving like union 
GO
select id from (select id from uniontest)
--It will return all 3 rows and it shows that derived table just returns the rows as it is.
 

Issue #8878

Closed
Fixed
Resolved 2013-06-20T18:51:27Z
 
 
Completion
No due date
Fixed Build ADS 14.0.0-beta-32 (mongo-jdbc 1.2.1)
No time estimate

About AquaClusters Privacy Policy Support Version - 19.0.2-4 AquaFold, Inc Copyright © 2007-2017