Return-Path: X-Original-To: apmail-jackrabbit-dev-archive@www.apache.org Delivered-To: apmail-jackrabbit-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A85EEE505 for ; Thu, 24 Jan 2013 15:33:17 +0000 (UTC) Received: (qmail 14178 invoked by uid 500); 24 Jan 2013 15:33:16 -0000 Delivered-To: apmail-jackrabbit-dev-archive@jackrabbit.apache.org Received: (qmail 14001 invoked by uid 500); 24 Jan 2013 15:33:16 -0000 Mailing-List: contact dev-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@jackrabbit.apache.org Delivered-To: mailing list dev@jackrabbit.apache.org Received: (qmail 12816 invoked by uid 99); 24 Jan 2013 15:33:15 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 24 Jan 2013 15:33:15 +0000 Date: Thu, 24 Jan 2013 15:33:15 +0000 (UTC) From: "Thomas Mueller (JIRA)" To: dev@jackrabbit.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (JCR-3493) OUTER JOIN tests expect incorrect results MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/JCR-3493?page=3Dcom.atlassian.j= ira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D135616= 84#comment-13561684 ]=20 Thomas Mueller commented on JCR-3493: ------------------------------------- Look good to me, thanks! =20 > OUTER JOIN tests expect incorrect results > ----------------------------------------- > > Key: JCR-3493 > URL: https://issues.apache.org/jira/browse/JCR-3493 > Project: Jackrabbit Content Repository > Issue Type: Bug > Components: jackrabbit-jcr-tests > Affects Versions: 2.5.2 > Reporter: Randall Hauch > Fix For: 2.5.3, 2.6, 2.7 > > Attachments: jcr-3493-tests-2.patch, jcr-3493-tests.patch > > > Two of the OUTER JOIN tests appears to expect incorrect results: > - org.apache.jackrabbit.test.api.query.qom.EquiJoinConditionTest#testRigh= tOuterJoin1 > - org.apache.jackrabbit.test.api.query.qom.EquiJoinConditionTest#testLeft= OuterJoin2 > Both tests are set up the same way: two nodes are created: > /testroot/workarea/node1 {jcr:primaryType=3Dnt:unstructured, prop1=3Dyi= kqysrwur} > /testroot/workarea/node1/node2 {jcr:primaryType=3Dnt:unstructured, prop= 1=3Dyikqysrwur, prop2=3Dyikqysrwur, jcr:mixinTypes=3D[mix:referenceable], j= cr:uuid=3Dc9118bb2-922e-4612-acd7-7152105f5684} > A single string is randomly generated and used for the values for "prop1"= and "prop2", and only the second node is made to be "mix:referenceable".= =20 > The "testRightOuterJoin1" test runs this query: > SELECT * FROM [nt:unstructured] AS left=20 > RIGHT OUTER JOIN [nt:unstructured] AS right=20 > ON left.prop1 =3D right.prop2=20 > WHERE ISDESCENDANTNODE(right,'/testroot/workarea') > The left side of the join has at least two tuples (one for "node1", one f= or "node2", and other nodes which do not have a 'prop1' value), and column = of interest is the "prop1" column. Thus the left side tuples (or the parts = we care about for the join) look like: > =09[ node1, yikqysrwur ] > =09[ node2, yikqysrwur ] > =09[ =E2=80=A6, ] > The right side of the join has only two tuples ("node1" and "node2") beca= use of the "ISDESCENDANTNODE" criteria, and the only column of interest is = the "prop2" column. Thus, the right side tuples (or the parts we care about= for the join) look like: > =09[ node1, ] > =09[ node2, yikqysrwur ] > When we perform a RIGHT OUTER JOIN, we have to **include all the tuples o= n the right** even if they don't match a value on the left tuples. Thus, "n= ode1" must be included in the results, and because it has a null value for = the "prop2" column will not match any of the tuples on the left (since a nu= ll value is not equal to another null value in the case of join criteria). = So the result set should contain these combinations of nodes: > =09[ null, node1 ] > =09[ node1, node2 ] > =09[ node2, node2 ] > However, the test expects the following result: > =09[ node1, node2 ] > =09[ node2, node2 ] > This is incorrect to me, because it is missing the [node1, null] tuple th= at was on the right side of the join. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrato= rs For more information on JIRA, see: http://www.atlassian.com/software/jira