-
Notifications
You must be signed in to change notification settings - Fork 872
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
1.3.0 - aggregate functions do not work on embedded documents collection #1373
Comments
I don't know if it's right the current behavior or not, but try this: select from collection |
Luca, running the following query (added list function as you suggested) does not change anything: select The result is the same and it is actually inconsistent. On the input we have collection of documents: And the result says: It is a bug from my point of view. Regards |
So the data is not present in database? |
Luca, I am sorry for inconvenience. I try to explain it more clearly. If you prepare data: and run this query: you get the the correct content in DB: {"result":[{"@type":"d","@Rid":"#11:0","@Version":0,"@Class":"collection",
select {"result":[{"@type":"d","@Rid":"#-2:0","@Version":0, -if you try with [0, 0, 30, 50] -if you try with [0,0,30] You can note the following:
Regards |
…embedded documents collection (already fixed)
this is fixed in develop branch. |
Is this merged to 2.2 branch ? |
Versions:
-1.3.0 release
-OrientDB 1.4.0-SNAPSHOT 20130227-0214
Hi, could you try the following sequence:
create class collection
insert into collection set data = [{"size": 0}, {"size": 0}, {"size": 30}]
select
data.size,
data.size(),
min(data.size),
max(data.size),
sum(data.size),
avg(data.size)
from collection
returned:
{
"result": [{
"@type": "d", "@Rid": "#-2:0", "@Version": 0,
"data": [0, 30],
"data2": 3,
"sum": 30,
"avg": 15
}
]
}
expected:
{
"result": [{
"@type": "d", "@Rid": "#-2:0", "@Version": 0,
"data": [0, 0, 30],
"data2": 3,
"min": 0,
"max": 30
"sum": 30,
"avg": 10
}
]
}
It seems the aggregation is made on the set of values (not the list) .
The text was updated successfully, but these errors were encountered: