Closed vinodprathipati closed 8 years ago
Basically, It is failing for any operation which takes string parameters.
Example : "_$min " :["$rating_hist.MDY.rank","$rating_hist.S&P.rank"]
Hi @vinodprathipati,
bug reproduced, will fix soon...
Thanks for reporting it.
Hi @vinodprathipati
fixed in master and 1.1.x branches.
before releasing a new version I would ask you to try it. will you help?
$ git clone https://github.com/SoftInstigate/restheart.git
$ git checkout 1.1.x
$ mvn package
and use restheart.jar you'll find in target dir. thanks
I will test this and let you know soon. Thanks
Hi ,
I tested this. It is not throwing exception. But there is different problem...
Let's take this example :
1) I am doing an aggregation and i am projecting the minimum of few nested fields.
{"_$project":{"id":0, minRank: { "$min":["$rating_hist::MDY::rank","$rating_hist::S&P::rank"]} }}
the nested fields are at 2 levels down. The values are not coming up. The expressions are not getting resolved if the nested fields are more than 1 level.
Thanks, Vinod
the _$ and :: needs to be used only in objects keys.
can you try
{"$project":{"_id":0, minRank: { "$min":["$rating_hist.MDY.rank","$rating_hist.S&P.rank"]} }}
Hmm. It's my bad.. Yes.. we can close this bug.
I will test more.
We receive class cast exception during the following aggregation.
db.asset.aggregate( {$match:{"cntry_of_iss_cd" : "US","cpn_class_cd":"FIX ","debt_type_cd":"BND","put_terms_fl" : "n","ds_type_cd":"CORP"}} , {$project:{asset_id:1, cntry_of_iss_cd:1, cpn_class_cd:1, debt_type_cd:1, put_terms_fl:1, ds_type_cd:1,amt_outsd_hist: {$filter: { input:"$amt_outsd_hist", as : "item", cond: { $and: [{$lte:["$$item.amt_out_dt",ISODate("2003-12-18T04:00:00Z")]},{$gt:["$$item.amt_out_end_dt",ISODate("2003-12-18T04:00:00Z")]}]}} }}} )
I noticed the bug at AbstractAggregationOperation class during bindAggregationVariables.