Uploaded image for project: 'ModeShape'
  1. ModeShape
  2. MODE-1809

SELECT UNION with JOIN results in class cast exception

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Critical Critical
    • 3.1.2.Final, 3.2.0.Final
    • 3.1.1.Final
    • JCR, Query
    • None

      Is possible to do a query with JOIN and UNION ? Don't know if is the desired behavior but execution of query:

      SELECT a.* FROM [my:node] AS b JOIN [my:node] as a ON b.[ref1] = a.[jcr:uuid] UNION SELECT a.* FROM [my:node] AS b JOIN [my:node] as a ON b.[ref2] = a.[jcr:uuid]

      Result:

      java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to org.modeshape.jcr.query.QueryResults$Location
      at org.modeshape.jcr.query.process.ProcessingComponent$20.compare(ProcessingComponent.java:515)
      at org.modeshape.jcr.query.process.ProcessingComponent$20.compare(ProcessingComponent.java:511)
      at java.util.Arrays.mergeSort(Arrays.java:1270)
      at java.util.Arrays.mergeSort(Arrays.java:1281)
      at java.util.Arrays.sort(Arrays.java:1210)
      at java.util.Collections.sort(Collections.java:157)
      at org.modeshape.jcr.query.process.SortLocationsComponent.execute(SortLocationsComponent.java:52)
      at org.modeshape.jcr.query.process.UnionComponent.execute(UnionComponent.java:48)
      at org.modeshape.jcr.query.process.QueryProcessor.execute(QueryProcessor.java:96)
      at org.modeshape.jcr.query.process.QueryEngine.execute(QueryEngine.java:140)
      at org.modeshape.jcr.query.lucene.LuceneQueryEngine$1.getResults(LuceneQueryEngine.java:151)
      at org.modeshape.jcr.query.JcrQuery.execute(JcrQuery.java:119)

      (At the specified index position in the tuple there is a collection of uuid strings.)

              Unassigned Unassigned
              noah79 noah totti (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: