jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alex Parvulescu (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (JCR-2933) SQL2 Left Outer Join
Date Fri, 01 Apr 2011 09:27:05 GMT

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

Alex Parvulescu commented on JCR-2933:
--------------------------------------

wow

as impressive as that is, I'm not even sure that is within JR's capabilities.

Can you please submit a test that does a proper 3 way join, to have something to look at?
I'd like to see a simple test case working (or breaking) before we start doing something like
...
select t0.x , t1.x , t2.x , t3.x , t4.x , t5.x , t6.x , t7.x , t8.x from (((t0 inner join
((t1 right outer join (t2 inner join t3 on t2.x = t3.x ) on t1.x = t2.x ) left outer join
(t4 inner join t5 on t4.x = t5.x ) on t1.x = t4.x ) on t0.x = t2.x ) left outer join (t6 inner
join t7 on t6.x = t7.x ) on t1.x = t6.x ) inner join t8 on t5.x = t8.x ); 
...

As I see it, join are something new in JR, so I wouldn't go breaking everything just yet.
There are also very few test cases that cover them.

I find it worrying that the simple outer join (2 way if you will) does not work properly.
Also, I'd have that working and mark the +3 way up as experimental, than having something
that does not work at all.

> SQL2 Left Outer Join
> --------------------
>
>                 Key: JCR-2933
>                 URL: https://issues.apache.org/jira/browse/JCR-2933
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-core
>    Affects Versions: 2.2.4
>            Reporter: Manfred Sattler
>            Assignee: Jukka Zitting
>         Attachments: JCR-2933-v2.patch, JCR-2933-v3.patch, JCR-2933.patch
>
>
> Create this nodes.
> def n1 = root.addNode("node1", "sling:SamplePage");
> n1.setProperty("n1prop1", "page1");
> def n2 = n1.addNode("node2", "sling:SampleContent");
> n2.setProperty("n2prop1", "content1");
> Execute this Query:
> Select * from [sling:SamplePage] as page left outer join [sling:SampleContent] as content
on ISDESCENDANTNODE(content,page) where page.n1prop1 = 'page1' and content.n2prop1 = 'content1';
> The resultset have 1 row with 2 Nodes. This OK.
> Then execute this:
> Select * from [sling:SamplePage] as page left outer join [sling:SampleContent] as content
on ISDESCENDANTNODE(content,page) where page.n1prop1 = 'page1' and content.n2prop1 = 'XXXXX';
> The resultset has 1 row with 1 node.
> This wrong. The result should be 0 rows.
> Old Versions, prior 2.2.2 have also 0 rows as result.
> Also, if nodes "n2" not exists, jackrabbit reports 1 row as result.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message