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

Andrey Mashenkov reassigned IGNITE-26335:
-----------------------------------------

    Assignee: Andrey Mashenkov

> Sql. Failed to parse query with GROUPING aggregate over VALUES.
> ---------------------------------------------------------------
>
>                 Key: IGNITE-26335
>                 URL: https://issues.apache.org/jira/browse/IGNITE-26335
>             Project: Ignite
>          Issue Type: Bug
>          Components: sql ai3
>            Reporter: Andrey Mashenkov
>            Assignee: Andrey Mashenkov
>            Priority: Major
>              Labels: ignite-3
>
> Query with GROUPING aggregate over single group and values failed: 
> "Conversion to relational algebra failed to preserve datatypes"
> {noformat}
> SELECT GROUPING(f2), f1
> FROM ( VALUES ... ) as t(f1,f2)
> GROUP BY ALL GROUPING SETS ((f2, f1)){noformat}
> Similar query over 2 values and duplicate groups failed with 
> "java.lang.AssertionError: type mismatch:", when rewriting group sets to 
> UNIONĀ 
> {code:java}
> SELECT GROUPING(f2), f1
> FROM ( VALUES (1,1), (2,2)) as t(f1,f2)
> GROUP BY ALL GROUPING SETS ((f2, f1), (f1, f2)){code}
> The error is similar in both cases, Calcite build projection with incorrect 
> rowType.
> The GROUPING function returns BIGINT, but Calcite sets INTEGER to project 
> without a cast.
> Looks like a bug in Calcite and there is no workaround.



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

Reply via email to