[
https://issues.apache.org/jira/browse/CALCITE-7938?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Etienne Pelissier updated CALCITE-7938:
---------------------------------------
Summary: AggregateRemoveRule can cause failed planning because of collation
mismatch (was: AggregateRemoveRule fails to plan GROUP BY queries on unique
keys when the input has multiple collations)
> AggregateRemoveRule can cause failed planning because of collation mismatch
> ---------------------------------------------------------------------------
>
> Key: CALCITE-7938
> URL: https://issues.apache.org/jira/browse/CALCITE-7938
> Project: Calcite
> Issue Type: Bug
> Components: core
> Reporter: Etienne Pelissier
> Priority: Major
>
> Broken quidem test:
> {code}
> !set hep-rules "
> +CoreRules.AGGREGATE_PROJECT_MERGE,
> +CoreRules.AGGREGATE_REMOVE"
> select count(*) as s
> from (values (true, 1), (true, 2)) as t(col1, col2)
> where col1
> group by col2;
> +---+
> | S |
> +---+
> | 1 |
> | 1 |
> +---+
> (2 rows)
> !ok
> {code}
> The query fails with:
> {code}
> There are not enough rules to produce a node with desired properties
> There is 1 empty subset: ... ENUMERABLE.[0]
> {code}
> The issue is reproducible beyond VALUES, I have a JUnit reproducer ready.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)