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

When query with OR is divided into union of queries, orderings are lost

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 1.14.0
    • Fix Version/s: None
    • Component/s: core
    • Labels:
      None

      Description

      In org.apache.jackrabbit.oak.query.QueryImpl.buildAlternativeQuery() orderings are not passed into subqueries, nor into new UnionQueryImpl (it not only affects order, but in some cases cost of plans - in my case it caused index traversing).

      I have fixed this in my copy of sources by setting orderings on result:

      result = newAlternativeUnionQuery(left, right);
      result.setOrderings(orderings);
      }
      }
      return result;

       

       

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              piotr_tajdus Piotr Tajduś
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: