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

OR query with ORDER BY don't work as expected

    XMLWordPrintableJSON

    Details

      Description

      A query with Or and having order by along with limit Don't reproduce results as per order mentioned. 

      e.g. 

      Let content be:

      "/UnionQueryTest1/node0",
      "/UnionQueryTest/node0",
      "/UnionQueryTest1/node0/node1",
      "/UnionQueryTest/node0/node1",
      "/UnionQueryTest1/node0/node1/node2",
      "/UnionQueryTest/node0/node1/node2",
      "/UnionQueryTest1/node0/node1/node2/node3",
      "/UnionQueryTest/node0/node1/node2/node3"

      each node having x = number in node name.

      SELECT idn1.* FROM [nt:base] as idn1 WHERE ISDESCENDANTNODE([/UnionQueryTest]) OR  ISDESCENDANTNODE([/UnionQueryTest1]) ORDER BY idn1.[x] ASC

       

      result should be  same as above mentioned where as current result come out to be

      /UnionQueryTest1/node0
      /UnionQueryTest1/node0/node1
      /UnionQueryTest1/node0/node1/node2
      /UnionQueryTest1/node0/node1/node2/node3
      /UnionQueryTest1/node0/node1/node2/node3/node4
      /UnionQueryTest/node0
      /UnionQueryTest/node0/node1
      /UnionQueryTest/node0/node1/node2

       

        Attachments

          Activity

            People

            • Assignee:
              mkataria Mohit Kataria
              Reporter:
              mkataria Mohit Kataria
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: