[
https://issues.apache.org/jira/browse/JCR-3376?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Thomas Mueller resolved JCR-3376.
---------------------------------
Resolution: Fixed
Revision 1359213 allows for optional nodes to be in the result. For the test
SQLPathTest.testChildAxisRoot, the root node is now optional.
I tested with Jackrabbit Core (-PintegrationTesting) and with Oak (oak-jcr),
with the test removed from the known.issues list in the pom.xml.
> TCK: SQLPathTest.testChildAxisRoot expects root node not in result
> ------------------------------------------------------------------
>
> Key: JCR-3376
> URL: https://issues.apache.org/jira/browse/JCR-3376
> Project: Jackrabbit Content Repository
> Issue Type: Improvement
> Reporter: Thomas Mueller
> Assignee: Thomas Mueller
> Priority: Minor
> Fix For: 2.6
>
>
> The TCK test SQLPathTest.testChildAxisRoot runs the following SQL-1 query:
> SELECT * FROM nt:base WHERE jcr:path LIKE '/%' AND NOT jcr:path LIKE
> '/%/%'
> It expects the result to be
> /jcr:system, /testroot, /testdata
> It does not allow the implementation to return the root node ('/'). According
> to the specification, a JCR implementation may filter the root node, as noted
> by Randall Hauch -
> http://jackrabbit.510166.n4.nabble.com/TCK-SQLPathTest-testChildAxisRoot-td4655670.html
> - quote:
> "
> Section 6.6.5.1 ("jcr:like function") defines the semantics of the wildcard
> characters as generally used within LIKE predicates (and "jcr:like" in XPath):
> "As in SQL, the character '%' represents any string of zero or more
> characters, and the character '_' (underscore) represents any
> single character."
> while Section 8.5.2.2 ("Pseudo-property jcr:path") specifies the semantics
> "jcr:path" pseudo column and narrows the semantics of using LIKE with
> "jcr:path" in the second-to-last bullet point:
> "Predicates in the WHERE clause that test jcr:path are only required to
> support the operators =, <> and LIKE. In the case of LIKE predicates,
> support is only required for tests using the % wildcard character as a
> match for a whole path segment (the part between two / characters)
> or within index brackets...."
> Because the '%' matches only a whole path segment, the "/%" literal only
> matches paths that have at least one path segment, which means that it
> matches all descendants of the root node.
> "
> the specification says "In the case of LIKE predicates, support is only
> required for tests using the % wildcard character as a match for a whole path
> segment (the part between two / characters)..." but it doesn't specify it
> needs to do so.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira