You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Roman Kondakov (JIRA)" <ji...@apache.org> on 2019/05/07 16:02:00 UTC

[jira] [Updated] (IGNITE-11839) SQL: table join order changes may lead to incorrect result

     [ https://issues.apache.org/jira/browse/IGNITE-11839?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Roman Kondakov updated IGNITE-11839:
------------------------------------
    Description: 
Under some circumstances table join order changes may lead to incorrect result. For example if one of joining tables is {{REPLICATED}} and another has {{queryparallelism > 1}}.

This problem can be reproduced in test {{IgniteSqlSegmentedIndexSelfTest#testSegmentedPartitionedWithReplicated}} if swap tables {{Person}} and {{Organization}} in the method {{IgniteSqlSegmentedIndexSelfTest#checkLocalQueryWithSegmentedIndex}} and set {{enforceJoinOrder}} flag to {{true}}:


{code:java}
String select0 = "select o.name n1, p.name n2 from  \"org\".Organization o, \"pers\".Person p  where p.orgId = o._key";

            List<List<?>> res = c1.query(new SqlFieldsQuery(select0).setLocal(true).setEnforceJoinOrder(true)).getAll();
{code}


  was:
Under some circumstances table join order changes may lead to incorrect result. For example if one of joining tables is {{REPLICATED}} and another has {{queryparallelism > 1}}.

This problem can be reproduced in test {{IgniteSqlSegmentedIndexSelfTest#testSegmentedPartitionedWithReplicated}} if swap tables {{Person}} and {{Organization}} in the method {{IgniteSqlSegmentedIndexSelfTest#checkLocalQueryWithSegmentedIndex}} and set {{enforceJoinOrder}} flag to {{true}}.


> SQL: table join order changes may lead to incorrect result
> ----------------------------------------------------------
>
>                 Key: IGNITE-11839
>                 URL: https://issues.apache.org/jira/browse/IGNITE-11839
>             Project: Ignite
>          Issue Type: Bug
>          Components: sql
>    Affects Versions: 2.7
>            Reporter: Roman Kondakov
>            Priority: Major
>             Fix For: 2.8
>
>
> Under some circumstances table join order changes may lead to incorrect result. For example if one of joining tables is {{REPLICATED}} and another has {{queryparallelism > 1}}.
> This problem can be reproduced in test {{IgniteSqlSegmentedIndexSelfTest#testSegmentedPartitionedWithReplicated}} if swap tables {{Person}} and {{Organization}} in the method {{IgniteSqlSegmentedIndexSelfTest#checkLocalQueryWithSegmentedIndex}} and set {{enforceJoinOrder}} flag to {{true}}:
> {code:java}
> String select0 = "select o.name n1, p.name n2 from  \"org\".Organization o, \"pers\".Person p  where p.orgId = o._key";
>             List<List<?>> res = c1.query(new SqlFieldsQuery(select0).setLocal(true).setEnforceJoinOrder(true)).getAll();
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)