[
https://issues.apache.org/jira/browse/CALCITE-7934?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18143941#comment-18143941
]
Etienne Pelissier commented on CALCITE-7934:
--------------------------------------------
Hey [~asolimando], you're welcome!
The problem is indeed reproducible beyond VALUES. I'll provide an example in
the PR.
Yes, it's an indexing problem, I have linked the tickets you mentioned.
I will open a PR today.
Thanks for your guidance!
> Aggregate uniqueness metadata uses incorrect column ordinals
> ------------------------------------------------------------
>
> Key: CALCITE-7934
> URL: https://issues.apache.org/jira/browse/CALCITE-7934
> Project: Calcite
> Issue Type: Bug
> Components: core
> Reporter: Etienne Pelissier
> Priority: Major
>
> Broken quidem test:
> {code:java}
> !set hep-rules "
> +CoreRules.AGGREGATE_PROJECT_MERGE,
> +CoreRules.AGGREGATE_REMOVE"
> select distinct count(*) filter (where col1) as s
> from (values
> (true, 1),
> (true, 2)) as t(col1, col2)
> group by col2;
> +---+
> | S |
> +---+
> | 1 |
> +---+
> (1 row){code}
> The result produced by Calcite contains two rows instead of one.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)