Uploaded image for project: 'Jackrabbit Oak'
  1. Jackrabbit Oak
  2. OAK-237 Run Jackrabbit query tests
  3. OAK-295

Jackrabbit query with spaces in node names

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 0.6
    • core, query
    • None

    Description

      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?

      Attachments

        Activity

          People

            thomasm Thomas Mueller
            stillalex Alex Deparvu
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: