[
https://issues.apache.org/jira/browse/IGNITE-24773?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Vladimir Steshin updated IGNITE-24773:
--------------------------------------
Ignite Flags: Release Notes Required (was: Docs Required,Release Notes
Required)
> Calcite. IgniteReduceSortAggregate misses collation.
> ----------------------------------------------------
>
> Key: IGNITE-24773
> URL: https://issues.apache.org/jira/browse/IGNITE-24773
> Project: Ignite
> Issue Type: Improvement
> Reporter: Vladimir Steshin
> Priority: Major
> Time Spent: 10m
> Remaining Estimate: 0h
>
> *Reproducer:*
> {code:java}
> CREATE TABLE tab4(pk INTEGER PRIMARY KEY, col0 INTEGER, col1 FLOAT, col3
> INTEGER)
> CREATE INDEX idx_tab4_1 ON tab4 (col3)
> CREATE INDEX idx_tab4_3 ON tab4 (col1,col0 DESC)
> INSERT INTO tab4 VALUES(0,544,473.59,846)
> INSERT INTO tab4 VALUES(1,551,716.92,562)
> INSERT INTO tab4 VALUES(2,481,975.35,652)
> INSERT INTO tab4 VALUES(3,345,371.4,51)
> SELECT pk, col0 FROM tab4 WHERE (col0 IN (SELECT col3 FROM tab4 WHERE col0 >=
> 955)) ORDER BY 1 DESC
> {code}
> *Error:*
> {code:java}
> java.lang.AssertionError: null
> at
> org.apache.ignite.internal.processors.query.calcite.exec.rel.SortAggregateNode.<init>(SortAggregateNode.java:81)
> ~[classes/:?]
> at
> org.apache.ignite.internal.processors.query.calcite.exec.LogicalRelImplementor.visit(LogicalRelImplementor.java:860)
> ~[classes/:?]
> at
> org.apache.ignite.internal.processors.query.calcite.exec.LogicalRelImplementor.visit(LogicalRelImplementor.java:124)
> ~[classes/:?]
> at
> org.apache.ignite.internal.processors.query.calcite.rel.agg.IgniteReduceSortAggregate.accept(IgniteReduceSortAggregate.java:111)
> ~[classes/:?]
> at
> org.apache.ignite.internal.processors.query.calcite.exec.LogicalRelImplementor.visit(LogicalRelImplementor.java:885)
> ~[classes/:?]
> at
> org.apache.ignite.internal.processors.query.calcite.exec.LogicalRelImplementor.visit(LogicalRelImplementor.java:895)
> ~[classes/:?]
> at
> org.apache.ignite.internal.processors.query.calcite.exec.LogicalRelImplementor.visit(LogicalRelImplementor.java:176)
> ~[classes/:?]
> at
> org.apache.ignite.internal.processors.query.calcite.exec.LogicalRelImplementor.visit(LogicalRelImplementor.java:124)
> ~[classes/:?]
> at
> org.apache.ignite.internal.processors.query.calcite.rel.IgniteSender.accept(IgniteSender.java:100)
> ~[classes/:?]
> at
> org.apache.ignite.internal.processors.query.calcite.exec.LogicalRelImplementor.visit(LogicalRelImplementor.java:885)
> ~[classes/:?]
> at
> org.apache.ignite.internal.processors.query.calcite.exec.LogicalRelImplementor.go(LogicalRelImplementor.java:900)
> ~[classes/:?]
> at
> org.apache.ignite.internal.processors.query.calcite.exec.ExecutionServiceImpl.executeFragment(ExecutionServiceImpl.java:849)
> ~[classes/:?]
> at
> org.apache.ignite.internal.processors.query.calcite.exec.ExecutionServiceImpl.onMessage(ExecutionServiceImpl.java:912)
> ~[classes/:?]
> {code}
> *Assumption:*
> `_IgniteReduceSortAggregate_` loses traits in
> `_IgniteReduceSortAggregate(RelInput input)_` and doesn't return the
> collation in `_public RelCollation collation()_` directly. Instead, it tries
> to get it from the traits which are already lost.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)