You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Vladimir Steshin (Jira)" <ji...@apache.org> on 2024/10/28 19:05:00 UTC

[jira] [Created] (IGNITE-23557) Calcite. Assertion in COUNT(DISTINCT) accumulator.

Vladimir Steshin created IGNITE-23557:
-----------------------------------------

             Summary: Calcite. Assertion in COUNT(DISTINCT) accumulator.
                 Key: IGNITE-23557
                 URL: https://issues.apache.org/jira/browse/IGNITE-23557
             Project: Ignite
          Issue Type: Bug
            Reporter: Vladimir Steshin


Reproducer:

{code:java}
CREATE TABLE integers(i INTEGER)
INSERT INTO integers VALUES (1), (2), (3), (NULL)
SELECT i=ALL(SELECT i FROM integers WHERE i<>i1.i) FROM integers i1 ORDER BY i;
{code}

Result:

{code:java}
Caused by: java.lang.AssertionError: idx=0; arglist=[]
	at org.apache.ignite.internal.processors.query.calcite.exec.exp.agg.Accumulators$AbstractAccumulator.get(Accumulators.java:272)
	at org.apache.ignite.internal.processors.query.calcite.exec.exp.agg.Accumulators$DistinctAccumulator.add(Accumulators.java:1352)
	at org.apache.ignite.internal.processors.query.calcite.exec.exp.agg.AccumulatorsFactory$AccumulatorWrapperImpl.add(AccumulatorsFactory.java:326)
	at org.apache.ignite.internal.processors.query.calcite.exec.rel.HashAggregateNode$Grouping.addOnMapper(HashAggregateNode.java:306)
	at org.apache.ignite.internal.processors.query.calcite.exec.rel.HashAggregateNode$Grouping.add(HashAggregateNode.java:277)
	at org.apache.ignite.internal.processors.query.calcite.exec.rel.HashAggregateNode.push(HashAggregateNode.java:130)
	at org.apache.ignite.internal.processors.query.calcite.exec.rel.FilterNode.filter(FilterNode.java:127)
	at org.apache.ignite.internal.processors.query.calcite.exec.rel.FilterNode.push(FilterNode.java:82)
	at org.apache.ignite.internal.processors.query.calcite.exec.rel.TableSpoolNode.doPush(TableSpoolNode.java:111)
	at org.apache.ignite.internal.processors.query.calcite.exec.rel.TableSpoolNode.push(TableSpoolNode.java:146)
	at org.apache.ignite.internal.processors.query.calcite.exec.rel.Inbox.pushUnordered(Inbox.java:304)
	at org.apache.ignite.internal.processors.query.calcite.exec.rel.Inbox.push(Inbox.java:203)
	at org.apache.ignite.internal.processors.query.calcite.exec.rel.Inbox.doPush(Inbox.java:184)
{code}

Calcite can create `AggregateCall` with empty `getArgList()`.

Adoption of  #IGNITE-19401 





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