Evgeny Stanilovsky created IGNITE-28986:
-------------------------------------------
Summary: Local and Partitions queries are broken if Exchange is
raized
Key: IGNITE-28986
URL: https://issues.apache.org/jira/browse/IGNITE-28986
Project: Ignite
Issue Type: Bug
Affects Versions: 2.18
Reporter: Evgeny Stanilovsky
Local and specific partitions queries [1], [2] are broken if Exchange is
raised.
How to reproduce is master:
For partitions (QueryWithPartitionsIntegrationTest) the same as for local :
LocalQueryIntegrationTest#testJoin()
For exchange emulation i just modify a query :
{code:java}
String sql = "select /*+ MERGE_JOIN */* from " + table1 + " join " +
table2 +
" on " + table1 + "." + joinCol + "=" + table2 + "." +
joinCol;
{code}
and rel (IgniteMergeJoin) to make exchange relative plan more cheap:
{code:java}
IgniteMergeJoin#computeSelfCost ->
//add
RelNode stripped = getLeft().stripped();
boolean inputScan = stripped instanceof TableScan;
if (inputScan)
return IgniteCost.HUGE;
{code}
and here we are :
plan becomes :
{code:java}
IgniteExchange
IgniteMergeJoin
IgniteExchange
IgniteIndexScan
IgniteExchange
IgniteIndexScan
{code}
and tests fails with:
{code:java}
java.lang.AssertionError: expected:<3145> but was:<10000>
at
org.apache.ignite.internal.processors.query.calcite.integration.LocalQueryIntegrationTest.test(LocalQueryIntegrationTest.java:204)
{code}
It also work for Spool related plans, i.e. plans with spool are also will fail
such a tests.
[1] https://issues.apache.org/jira/browse/IGNITE-19998 SQL Calcite: Add support
of setting partitions in SqlFieldsQuery
[2] https://issues.apache.org/jira/browse/IGNITE-19725 Calcite-2. Add local
flag support
--
This message was sent by Atlassian Jira
(v8.20.10#820010)