× Heads up!

Aqua Data Studio / nhilam

Follow
IDE for Relational Databases
×
slavakiev reported 2013-05-28T12:41:44Z  · last modified 2013-08-13T11:09:03Z

Issues with operations in WHAT clause of SELECT with GROUP BY


Priority Low
Complexity Unknown
Component MongoSQL
Version 14.0

Tested on Aqua Data Studio 14.0-alpha-23 Build #: 32551 on Ubuntu 12.04( Mongo DB 2.4.3)  and Windows XP ( Mongo DB 2.0.9).

When using operations in the WHAT clause in SELECT statement with  GROUP BY "Don't know how to aggregate" error appears e.g.:

select (valuation * valuation) as mul from baseball group by valuation
But eqv Mongo shell command works correct:
db.baseball.aggregate({$project:{"valuation":1,"mul":{$multiply:["$valuation","$valuation"]}}})
 
All the same with other aggregation operations like +,-, /,%,&,| etc. Below list of examples with comments:
 
-- error message: Don't know how to aggregate
-- works correct: db.baseball.aggregate({$project:{"valuation":1,"mul":{$add:["$valuation","$valuation"]}}})
select (valuation + valuation) as mul from baseball group by valuation
go
-- error message: Don't know how to aggregate
--works correct: db.baseball.aggregate({$project:{"valuation":1,"mul":{$subtract:["$valuation","$valuation"]}}})
select (valuation - valuation) as mul from baseball group by valuation
go
-- error message: Don't know how to aggregate
-- works correct:db.baseball.aggregate({$project:{"valuation":1,"mul":{$divide:["$valuation","$valuation"]}}})
select (valuation / valuation) as mul from baseball group by valuation
go
-- error message: Don't know how to aggregate
-- works correct:db.baseball.aggregate({$project:{"valuation":1,"mul":{$mod:["$valuation","$valuation"]}}})
select (valuation % valuation) as mul from baseball group by valuation
go
-- error message: Don't know how to aggregate
-- works correct:db.baseball.aggregate({$project:{"valuation":1,"mul":{$and:["$valuation","$valuation"]}}})
select (valuation & valuation) as mul from baseball group by valuation
go-- error message: Don't know how to aggregate
-- works correct:db.baseball.aggregate({$project:{"valuation":1,"mul":{$or:["$valuation","$valuation"]}}})
select (valuation | valuation) as mul from baseball group by valuation
go

 

Issue #9172

Closed
Fixed
Resolved 2013-08-07T14:52:03Z
 
 
Completion
No due date
Fixed Build ADS 14.0.0-beta-82 (mongo-jdbc 1.2.7)
No time estimate

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