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

Thomas Mueller commented on OAK-295:
------------------------------------

I wonder whether this is a bug in the test. The JCR 2.0 spec says:

http://www.day.com/specs/jcr/2.0/6_Query.html#6.7.23%20Path

Path ::= '[' quotedPath ']' | '[' simplePath ']' | simplePath

quotedPath ::= /* A JCR Path that contains non-SQL-legal characters */
simplePath ::= /* A JCR Name that contains only SQL-legal characters */

What we seem to have in testGetChildrenEscapedNode ([/testroot/'a b']) is a mix 
of both. As far as I understand, according to the spec, it should be either 
[/testroot/a b] or ['/testroot/a b'].
                
> Jackrabbit query with spaces in node names
> ------------------------------------------
>
>                 Key: OAK-295
>                 URL: https://issues.apache.org/jira/browse/OAK-295
>             Project: Jackrabbit Oak
>          Issue Type: Sub-task
>            Reporter: Alex Parvulescu
>
> I'm looking at {{SQL2PathEscapingTest#testGetChildrenApiDirect}} - one of 2 
> failing tests imported from the Jackrabbit query test suite.
> The query that doesn't work looks like
> {{select [selector].* from [{http://www.jcp.org/jcr/nt/1.0}base] AS 
> [selector] where ISCHILDNODE([selector], [/testroot/a b])}}
> This query is build using the {{QueryObjectModelFactory}} but then it gets 
> transformed to its sql2 query equivalent string and then parsed back in 
> again, so the {{SQL2Parser}} in oak gets confused and the path {{/testroot/a 
> b}} gets mangled into {{/testroot/ab}}.
> I see one of 2 issues as the coulprit
>  - the path is not quoted, maybe that is why the {{SQL2Parser}} can't extract 
> it properly. In this case who should handle quoting?
> or
>  - the SQL2Parser should be able to extract the path properly, it is 
> surrounded by [] tokens anyway.
> thoughts?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to