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

Peeyush Gupta updated ASTERIXDB-3116:
-------------------------------------
    Description: 
 
{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

  was:
// 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
 
Return 0 instead of 35


> 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
>            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