[ 
https://issues.apache.org/jira/browse/ASTERIXDB-1278?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

James Fang updated ASTERIXDB-1278:
----------------------------------
    Description: 
I was investigating aggregation functions on a list of records and found a bug 
when an incorrect result was returned. From what I have tested, it only affects 
avg and sql-avg.

Query: 
let $w:=[{"item":1, "price":1},{"item":1, "price":2},{"item":2, "price":3}]
return avg(for $x in $w return $x.price)

Result:
4611686018427387904



  was:
I was investigating aggregation functions on a list of records and found a bug 
where an incorrect result was returned. From what I have tested, it only 
affects avg and sql-avg.

Query: 
let $w:=[{"item":1, "price":1},{"item":1, "price":2},{"item":2, "price":3}]
return avg(for $x in $w return $x.price)

Result:
4611686018427387904




> Incorrect result from avg
> -------------------------
>
>                 Key: ASTERIXDB-1278
>                 URL: https://issues.apache.org/jira/browse/ASTERIXDB-1278
>             Project: Apache AsterixDB
>          Issue Type: Bug
>          Components: Functions - AQL
>            Reporter: James Fang
>
> I was investigating aggregation functions on a list of records and found a 
> bug when an incorrect result was returned. From what I have tested, it only 
> affects avg and sql-avg.
> Query: 
> let $w:=[{"item":1, "price":1},{"item":1, "price":2},{"item":2, "price":3}]
> return avg(for $x in $w return $x.price)
> Result:
> 4611686018427387904



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to