Description
SELECT distinct(name) FROM Orders UNION SELECT name from Account
breaks Calcite with assertion:
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)
appropriate plan:
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
Attachments
Issue Links
- duplicates
-
IGNITE-13817 Calcite bug. Select count assertionError
- Resolved
- is fixed by
-
IGNITE-13817 Calcite bug. Select count assertionError
- Resolved
- is part of
-
IGNITE-12248 Apache Calcite based query execution engine
- Open