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

Artem Shutak edited comment on IGNITE-1232 at 3/22/16 4:40 PM:
---------------------------------------------------------------

I've investigated the failure of the assert and found a minimal query to 
reproduce.
{code}
  select rootOrderId
  from (
        select rootOrderId from "part".CustOrder

        union all

        select rootOrderId from "part".ReplaceOrder
  ) co
{code}

At the same time, test for union-ubquery works as well.

To properly fix it, I need more understanding in {{GridH2CollocationModel}}, 
especially what is the right tree of {{GridH2CollocationModel}} objects in case 
of inner union?
I see at least 2 possible trees:
1. 
{noformat}
GridH2CollocationModel_1(upper=null)                             - represents 
all query
|---GridH2CollocationModel_2                                            - 
represents union query (unions list here)
    |---GridH2CollocationModel_3                                        - 
represents left union query
    |---GridH2CollocationModel_4                                        - 
represents right union query
{noformat}
2.
{noformat}
GridH2CollocationModel_1(upper=null)                             - represents 
all query (unions list here)
    |---GridH2CollocationModel_2                                        - 
represents left union query
    |---GridH2CollocationModel_3                                        - 
represents right union query
{noformat}

>From current implementation I see that we want to achieve the second tree, but 
>it looks like wrong and we should have the first one.


was (Author: ashutak):
I've investigated the failure of the assert and found minimal query to 
reproduce.
{code}
  select rootOrderId
  from (
        select rootOrderId from "part".CustOrder

        union all

        select rootOrderId from "part".ReplaceOrder
  ) co
{code}

At the same time, test for union-ubquery works as well.

To properly fix it, I need more understanding in {{GridH2CollocationModel}}, 
especially what is the right tree of {{GridH2CollocationModel}} objects in case 
of inner union?
I see at least 2 possible trees:
1. 
{noformat}
GridH2CollocationModel_1(upper=null)                             - represents 
all query
|---GridH2CollocationModel_2                                            - 
represents union query (unions list here)
    |---GridH2CollocationModel_3                                        - 
represents left union query
    |---GridH2CollocationModel_4                                        - 
represents right union query
{noformat}
2.
{noformat}
GridH2CollocationModel_1(upper=null)                             - represents 
all query (unions list here)
    |---GridH2CollocationModel_2                                        - 
represents left union query
    |---GridH2CollocationModel_3                                        - 
represents right union query
{noformat}

>From current implementation I see that we want to achieve the second tree, but 
>it looks like wrong and we should have the first one.

> Support distributed SQL JOIN 
> -----------------------------
>
>                 Key: IGNITE-1232
>                 URL: https://issues.apache.org/jira/browse/IGNITE-1232
>             Project: Ignite
>          Issue Type: Improvement
>            Reporter: Sergi Vladykin
>            Assignee: Sergi Vladykin
>             Fix For: 1.6
>
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to