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] [Updated] (JCR-2933) SQL2 Left Outer Join
Date Thu, 07 Apr 2011 11:52:06 GMT

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

Alex Parvulescu updated JCR-2933:
---------------------------------

    Attachment: JCR-2933-v4.patch

Hi Manfred,

finally an answer :)

I'm attatching a new version of the patch, that includes the upgraded version of JCR-2852
also.
I've also added a test for the latest problem (testOuterJoinDoubleJoinSplit).

Some performance things you should consider: sometimes the query engine will split a given
query into more subqueries that will be merged at runtime.
This is not really documented, it is on my todo list :)

I've also started the work for a query debugger.

To see it in action just enable debug logging for QueryEngine.
...just add this to logback-test.xml when you run a test:
  <logger name="org.apache.jackrabbit.core.query.lucene.join.QueryEngine" level="DEBUG"
/>
...and look at the log (target/jcr.log).


I've had to time to look at tests for 3 way joins. that will be next I guess.

> 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-v4.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