Uploaded image for project: 'Jackrabbit Oak'
  1. Jackrabbit Oak
  2. OAK-5413

XPath: "union" combined with "or" is not converted correctly

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.5.18, 1.6.0
    • query
    • None

    Description

      In OAK-4265 a limited form of "union" for XPath was added. However, union queries that contain "or" are not converted properly. For example:

      //*[@a=1 or @b=1]
      select [jcr:path], [jcr:score], * from [nt:base] as a where [a] = 1 
      union select [jcr:path], [jcr:score], * from [nt:base] as a where [b] = 1
      

      but

      (//*[@a=1 or @b=1] | //*[@c=1])
      select [jcr:path], [jcr:score], * from [nt:base] as a where [a] = 1 or [b] = 1 
      union select [jcr:path], [jcr:score], * from [nt:base] as a where [c] = 1
      

      It should be converted to:

      select [jcr:path], [jcr:score], * from [nt:base] as a where [a] = 1 
      union select [jcr:path], [jcr:score], * from [nt:base] as a where [b] = 1 
      union select [jcr:path], [jcr:score], * from [nt:base] as a where [c] = 1 
      

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: