ignite-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexander Paschenko (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (IGNITE-7413) SqlDmlExample: Incorrect result for Delete if run with standalone nodes (Java & .NET)
Date Tue, 16 Jan 2018 18:50:00 GMT

    [ https://issues.apache.org/jira/browse/IGNITE-7413?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16327549#comment-16327549
] 

Alexander Paschenko edited comment on IGNITE-7413 at 1/16/18 6:49 PM:
----------------------------------------------------------------------

[~ptupitsyn], I've done some investigation and here's what I've found.

If you ask me, currently the problem is not {{JOIN}}, but rather {{IN}} clause.

Consider following {{SELECT}} query (generated by DML engine):
{code:java}
SELECT
_KEY,
_VAL
FROM "SqlDmlExamplePersons".PERSON
WHERE ID IN( SELECT
P.ID
FROM "SqlDmlExamplePersons".PERSON P 
INNER JOIN "SqlDmlExampleOrganizations".ORGANIZATION O 
ON TRUE
WHERE (O.NAME <> ?1) AND (P.ORGID = O.ID) ){code}
It won't return correct result even if you set {{distributedJoins=true}} because distributed
joins flag seems to work only for top-level query and doesn't seem to care about stuff like
INs and other subqueries. That said, I believe that the problem is our joins implementation.
What can be done with this and at what cost requires additional investigation.


was (Author: al.psc):
[~ptupitsyn], I've done some investigation and here's what I've found.

I've looked at {{DELETE}} statement as it contains {{JOIN}} too.

Alas, the problem is not {{JOIN}}, but rather {{IN}} clause.

Consider following {{SELECT}} query (generated by DML engine):
{code:java}
SELECT
_KEY,
_VAL
FROM "SqlDmlExamplePersons".PERSON
WHERE ID IN( SELECT
P.ID
FROM "SqlDmlExamplePersons".PERSON P 
INNER JOIN "SqlDmlExampleOrganizations".ORGANIZATION O 
ON TRUE
WHERE (O.NAME <> ?1) AND (P.ORGID = O.ID) ){code}
It won't return correct result even if you set {{distributedJoins=true}} because distributed
joins flag seems to work only for top-level query and doesn't seem to care about stuff like
INs and other subqueries. That said, I believe that the problem is our joins implementation.
What can be done with this and at what cost requires additional investigation.

> SqlDmlExample: Incorrect result for Delete if run with standalone nodes (Java & .NET)
> -------------------------------------------------------------------------------------
>
>                 Key: IGNITE-7413
>                 URL: https://issues.apache.org/jira/browse/IGNITE-7413
>             Project: Ignite
>          Issue Type: Bug
>          Components: platforms
>    Affects Versions: 2.3
>            Reporter: Irina Zaporozhtseva
>            Assignee: Pavel Tupitsyn
>            Priority: Minor
>              Labels: .NET
>             Fix For: 2.4
>
>
> Datagrid.QueryDmlExample: Incorrect result for Delete if run with standalone nodes
>  
> without standalone nodes:
> {code}
> >>> Delete non-ASF employees 
> >>> 1: John Doe, ASF, 4400 
> >>> 2: Jane Roe, ASF, 5500
> {code}
>  
> with standalone nodes:
> {code}
> >>> Delete non-ASF employees 
> >>> 1: John Doe, ASF, 4400
> >>> 4: Richard Miles, Eclipse, 3000 
> >>> 2: Jane Roe, ASF, 5500
> {code}



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

Mime
View raw message