You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Konstantin Orlov (Jira)" <ji...@apache.org> on 2020/12/16 07:49:00 UTC
[jira] [Assigned] (IGNITE-13727) Calcite bug. Assertion on UNION
with DISTINCT.
[ https://issues.apache.org/jira/browse/IGNITE-13727?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Konstantin Orlov reassigned IGNITE-13727:
-----------------------------------------
Assignee: Konstantin Orlov
> Calcite bug. Assertion on UNION with DISTINCT.
> ----------------------------------------------
>
> Key: IGNITE-13727
> URL: https://issues.apache.org/jira/browse/IGNITE-13727
> Project: Ignite
> Issue Type: Bug
> Components: sql
> Affects Versions: 2.9
> Reporter: Stanilovsky Evgeny
> Assignee: Konstantin Orlov
> Priority: Major
> Labels: calcite
>
> {noformat}
> SELECT distinct(name) FROM Orders UNION SELECT name from Account{noformat}
> breaks Calcite with assertion:
> {noformat}
> java.lang.AssertionError: traits=IGNITE.[].any.one-way, distributionhash[0]
> at org.apache.calcite.rel.core.Exchange.<init>(Exchange.java:62)
> at org.apache.calcite.rel.core.Exchange.<init>(Exchange.java:71)
> at org.apache.ignite.internal.processors.query.calcite.rel.IgniteTrimExchange.<init>(IgniteTrimExchange.java:49)
> at SC.apply(Unknown Source)
> at org.apache.ignite.internal.processors.query.calcite.externalize.RelJson$RelFactory.apply(RelJson.java:115)
> at org.apache.ignite.internal.processors.query.calcite.externalize.RelJsonReader.readRel(RelJsonReader.java:111)
> at org.apache.ignite.internal.processors.query.calcite.externalize.RelJsonReader.readRels(RelJsonReader.java:103)
> at org.apache.ignite.internal.processors.query.calcite.externalize.RelJsonReader.read(RelJsonReader.java:92)
> at org.apache.ignite.internal.processors.query.calcite.externalize.RelJsonReader.fromJson(RelJsonReader.java:77)
> at org.apache.ignite.internal.processors.query.calcite.exec.ExecutionServiceImpl.prepareFragment(ExecutionServiceImpl.java:522)
> at org.apache.ignite.internal.processors.query.calcite.prepare.QueryPlanCacheImpl.queryPlan(QueryPlanCacheImpl.java:84)
> at org.apache.ignite.internal.processors.query.calcite.exec.ExecutionServiceImpl.onMessage(ExecutionServiceImpl.java:860)
> at org.apache.ignite.internal.processors.query.calcite.exec.ExecutionServiceImpl.lambda$init$1(ExecutionServiceImpl.java:435)
> at org.apache.ignite.internal.processors.query.calcite.message.MessageServiceImpl.onMessageInternal(MessageServiceImpl.java:276)
> at org.apache.ignite.internal.processors.query.calcite.message.MessageServiceImpl.lambda$onMessage$0(MessageServiceImpl.java:256)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
> {noformat}
> appropriate plan:
> {noformat}
> IgniteReduceAggregate(rowType=[RecordType(JavaType(class java.lang.String) NAME)], group=[{0}]): rowcount = 110.0, cumulative cost = 6140.0, id = 244
> IgniteExchange(distribution=[single]): rowcount = 110.0, cumulative cost = 6030.0, id = 243
> IgniteMapAggregate(group=[{0}]): rowcount = 110.0, cumulative cost = 4710.0, id = 242
> IgniteUnionAll(all=[true]): rowcount = 1100.0, cumulative cost = 4600.0, id = 241
> IgniteTrimExchange(distribution=[hash[0]]): rowcount = 100.0, cumulative cost = 2500.0, id = 240
> IgniteReduceAggregate(rowType=[RecordType(JavaType(class java.lang.String) NAME)], group=[{0}]): rowcount = 100.0, cumulative cost = 2400.0, id = 239
> IgniteExchange(distribution=[broadcast]): rowcount = 100.0, cumulative cost = 2300.0, id = 238
> IgniteMapAggregate(group=[{0}]): rowcount = 100.0, cumulative cost = 1100.0, id = 237
> IgniteTableScan(table=[[PUBLIC, ORDERS]], requiredColunms=[{2}]): rowcount = 1000.0, cumulative cost = 1000.0, id = 65
> IgniteTableScan(table=[[PUBLIC, ACCOUNT]], requiredColunms=[{2}]): rowcount = 1000.0, cumulative cost = 1000.0, id = 97
> {noformat}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)