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

Andrei Sereda resolved CALCITE-2890.
------------------------------------
       Resolution: Fixed
    Fix Version/s: 1.19.0

> ElasticSearch adapter. Combine any_value with other aggregation functions 
> failed
> --------------------------------------------------------------------------------
>
>                 Key: CALCITE-2890
>                 URL: https://issues.apache.org/jira/browse/CALCITE-2890
>             Project: Calcite
>          Issue Type: Bug
>          Components: elasticsearch-adapter
>    Affects Versions: 1.18.0
>            Reporter: Siyuan Liu
>            Priority: Major
>              Labels: easyfix, pull-request-available
>             Fix For: 1.19.0
>
>          Time Spent: 40m
>  Remaining Estimate: 0h
>
> As Andrei Sereda provided in CALCITE-2679, the following test cases cannot 
> pass.
> {code:java}
> // combine any_value with other aggregation functions (eg. max)
> CalciteAssert.that()
>   .with(newConnectionFactory())
>   .query("select cat1, any_value(cat2), max(val1) from view group by cat1")
>   .returnsUnordered("cat1=a; EXPR$1=g; EXPR$2=1.0",
>     "cat1=null; EXPR$1=g; EXPR$2=null",
>     "cat1=b; EXPR$1=h; EXPR$2=7.0");
> CalciteAssert.that()
>   .with(newConnectionFactory())
>   .query("select max(val1), cat1, any_value(cat2) from view group by cat1")
>   .returnsUnordered("EXPR$0=1.0; cat1=a; EXPR$2=g",
>     "EXPR$0=null; cat1=null; EXPR$2=g",
>     "EXPR$0=7.0; cat1=b; EXPR$2=h");
> CalciteAssert.that()
>   .with(newConnectionFactory())
>   .query("select any_value(cat2), cat1, max(val1) from view group by cat1")
>   .returnsUnordered("EXPR$0=g; cat1=a; EXPR$2=1.0",
>     "EXPR$0=g; cat1=null; EXPR$2=null",
>     "EXPR$0=h; cat1=b; EXPR$2=7.0");
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to