× Heads up!

Aqua Data Studio / nhilam

Follow
IDE for Relational Databases
×
SachinPrakash reported 2015-08-04T00:20:22Z  · tariqrahiman last modified 2015-12-07T08:10:27Z

Bug in Flattening behavior when dividing column by 1000


customer request enterprise
Dev
Emil Goicovici
emil.goicovici
QA ambikesh.shukla(*)
Priority Major
Complexity Unknown
Component MongoSQL
Version 17.0

Here is a sample document in my collection

{   "asset": "dsafjkkk",   "epochTimeInMillis":35647,   "anomalyResult": {     "name": "dsfljdfaslkj",     "modelResults": [       {         "modelName": "abc",         "anomalyScore": 12.49153623540901       },       {         "modelName": "pqr",         "anomalyScore": 12.38601205387994       }     ]   } }

 

Following 2 queries give different results.

1) Simply by dividing one of the columns by 1000 the flattening behavior changes.

2) Result_2 is repeat the row. It should have returned only 1 record.

 

Query_1

select FLATTEN_ARRAY asset, epochTimeInMillis, anomalyResult.modelResults.modelName as model, anomalyResult.modelResults.anomalyScore as score

from test

 

Result_1

asset epochTimeInMillis model score

dsafjkkk    35647       abc   12.49153623540901

dsafjkkk    35647       pqr   12.38601205387994

 

Query_2

select FLATTEN_ARRAY asset, epochTimeInMillis/1000 asepochTimeInSeconds, anomalyResult.modelResults.modelName as model, anomalyResult.modelResults.anomalyScore as score

from test

 

Result_2

asset epochTimeInMillis/1000  model.0     model.1     score.0     score.1

dsafjkkk    35.647            abc         pqr   12.49153623540901      12.38601205387994

dsafjkkk    35.647            abc         pqr   12.49153623540901      12.38601205387994

dsafjkkk    35.647            abc         pqr   12.49153623540901      12.38601205387994

dsafjkkk    35.647            abc         pqr   12.49153623540901      12.38601205387994

4 attachments

Issue #13625

Closed
Fixed
Resolved 2015-09-08T15:05:53Z
 
 
Completion
No due date
Fixed Build beta-18,bi-studio 1.4.7.2
No time estimate

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