[ 
https://issues.apache.org/jira/browse/ASTERIXDB-3116?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17694172#comment-17694172
 ] 

ASF subversion and git services commented on ASTERIXDB-3116:
------------------------------------------------------------

Commit cc2365ae6d621bd2eae3a0c5c076c05b8062c706 in asterixdb's branch 
refs/heads/master from Peeyush Gupta
[ https://gitbox.apache.org/repos/asf?p=asterixdb.git;h=cc2365ae6d ]

[ASTERIXDB-3116][COMP] Incorrect answer with parameters in aggregate functions

- user model changes: no
- storage format changes: no
- interface changes: no

Details:
With quries involving parameters inside a SQL92 type aggregation
functions, incorrect answers were returned. The reason being, during
rewriting of SQL92 types aggregate functions to SQL++ aggregate
function the external variable references were incorrectly mapped to
a field access.

Change-Id: I39349b6acd5600d4c0ee3783bd56dfdc1ed729c1
Reviewed-on: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/17393
Integration-Tests: Jenkins <[email protected]>
Tested-by: Jenkins <[email protected]>
Reviewed-by: Ali Alsuliman <[email protected]>
Reviewed-by: Ian Maxon <[email protected]>


> Incorrect answer with parameterized query with case expression inside 
> aggregates
> --------------------------------------------------------------------------------
>
>                 Key: ASTERIXDB-3116
>                 URL: https://issues.apache.org/jira/browse/ASTERIXDB-3116
>             Project: Apache AsterixDB
>          Issue Type: Bug
>            Reporter: Peeyush Gupta
>            Assignee: Peeyush Gupta
>            Priority: Major
>
>  
> {code:java}
> // param args:json=[1]
> select value sum(case when t.y > $1 then t.x else 0 end)
> from [
> { "x": 10, "y": 1 },
> { "x": 20, "y": 2 },
> { "x": 15, "y": 3 }
> ] t
> {code}
>  
> Return 0 instead of 35



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to