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

2020-07-03 Thread Aleksey Plekhanov (Jira)


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

Aleksey Plekhanov updated IGNITE-11839:
---
Fix Version/s: (was: 2.9)

> 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
>
> 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> res = c1.query(new 
> SqlFieldsQuery(select0).setLocal(true).setEnforceJoinOrder(true)).getAll();
> {code}
> Result is:
> {noformat}
> java.lang.AssertionError: 
> Expected :956
> Actual   :8
> 
>   at org.junit.Assert.fail(Assert.java:88)
>   at org.junit.Assert.failNotEquals(Assert.java:743)
>   at org.junit.Assert.assertEquals(Assert.java:118)
>   at org.junit.Assert.assertEquals(Assert.java:555)
>   at org.junit.Assert.assertEquals(Assert.java:542)
>   at 
> org.apache.ignite.testframework.junits.JUnitAssertAware.assertEquals(JUnitAssertAware.java:89)
>   at 
> org.apache.ignite.internal.processors.query.IgniteSqlSegmentedIndexSelfTest.checkLocalQueryWithSegmentedIndex(IgniteSqlSegmentedIndexSelfTest.java:280)
>   at 
> org.apache.ignite.internal.processors.query.IgniteSqlSegmentedIndexSelfTest.testSegmentedPartitionedWithReplicated(IgniteSqlSegmentedIndexSelfTest.java:222)
>   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>   at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>   at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>   at java.lang.reflect.Method.invoke(Method.java:498)
>   at 
> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
>   at 
> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
>   at 
> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
>   at 
> org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
>   at 
> org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
>   at 
> org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
>   at 
> org.apache.ignite.testframework.junits.GridAbstractTest$6.run(GridAbstractTest.java:2145)
>   at java.lang.Thread.run(Thread.java:748)
> {noformat}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


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

2019-10-08 Thread Maxim Muzafarov (Jira)


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

Maxim Muzafarov updated IGNITE-11839:
-
Fix Version/s: (was: 2.8)
   2.9

> 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.9
>
>
> 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> res = c1.query(new 
> SqlFieldsQuery(select0).setLocal(true).setEnforceJoinOrder(true)).getAll();
> {code}
> Result is:
> {noformat}
> java.lang.AssertionError: 
> Expected :956
> Actual   :8
> 
>   at org.junit.Assert.fail(Assert.java:88)
>   at org.junit.Assert.failNotEquals(Assert.java:743)
>   at org.junit.Assert.assertEquals(Assert.java:118)
>   at org.junit.Assert.assertEquals(Assert.java:555)
>   at org.junit.Assert.assertEquals(Assert.java:542)
>   at 
> org.apache.ignite.testframework.junits.JUnitAssertAware.assertEquals(JUnitAssertAware.java:89)
>   at 
> org.apache.ignite.internal.processors.query.IgniteSqlSegmentedIndexSelfTest.checkLocalQueryWithSegmentedIndex(IgniteSqlSegmentedIndexSelfTest.java:280)
>   at 
> org.apache.ignite.internal.processors.query.IgniteSqlSegmentedIndexSelfTest.testSegmentedPartitionedWithReplicated(IgniteSqlSegmentedIndexSelfTest.java:222)
>   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>   at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>   at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>   at java.lang.reflect.Method.invoke(Method.java:498)
>   at 
> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
>   at 
> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
>   at 
> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
>   at 
> org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
>   at 
> org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
>   at 
> org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
>   at 
> org.apache.ignite.testframework.junits.GridAbstractTest$6.run(GridAbstractTest.java:2145)
>   at java.lang.Thread.run(Thread.java:748)
> {noformat}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


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

2019-05-07 Thread Roman Kondakov (JIRA)


 [ 
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> res = c1.query(new 
SqlFieldsQuery(select0).setLocal(true).setEnforceJoinOrder(true)).getAll();
{code}

Result is:

{noformat}
java.lang.AssertionError: 
Expected :956
Actual   :8



at org.junit.Assert.fail(Assert.java:88)
at org.junit.Assert.failNotEquals(Assert.java:743)
at org.junit.Assert.assertEquals(Assert.java:118)
at org.junit.Assert.assertEquals(Assert.java:555)
at org.junit.Assert.assertEquals(Assert.java:542)
at 
org.apache.ignite.testframework.junits.JUnitAssertAware.assertEquals(JUnitAssertAware.java:89)
at 
org.apache.ignite.internal.processors.query.IgniteSqlSegmentedIndexSelfTest.checkLocalQueryWithSegmentedIndex(IgniteSqlSegmentedIndexSelfTest.java:280)
at 
org.apache.ignite.internal.processors.query.IgniteSqlSegmentedIndexSelfTest.testSegmentedPartitionedWithReplicated(IgniteSqlSegmentedIndexSelfTest.java:222)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at 
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
at 
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at 
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
at 
org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at 
org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
at 
org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
at 
org.apache.ignite.testframework.junits.GridAbstractTest$6.run(GridAbstractTest.java:2145)
at java.lang.Thread.run(Thread.java:748)

{noformat}


  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}}:


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

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



> 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> res = c1.query(new 
> SqlFieldsQuery(select0).setLocal(true).setEnforceJoinOrder(true)).getAll();
> {code}
> Result is:
> {noformat}
> java.lang.AssertionError: 
> Expected :956
> Actual   :8
> 
>   at org.junit.Assert.fail(Assert.java:88)
>   at org.junit.Assert.failNotEquals(Assert.java:743)
>   at org.junit.Assert.assertEquals(Assert.java:118)

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

2019-05-07 Thread Roman Kondakov (JIRA)


 [ 
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> 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> res = c1.query(new 
> SqlFieldsQuery(select0).setLocal(true).setEnforceJoinOrder(true)).getAll();
> {code}



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