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

Some valid non-identity joins will produce an error upon execution

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Blocker Blocker
    • 2.0.0.Final
    • 1.2.0.Final
    • JCR, Query
    • None

      A query that involves only identity equijoins are optimized down to a single SELECT query, and such queries work just fine. Also, some queries that involve a single ISCHILDNODE or ISDESCENDANTNODE criteria can also be optimized into a form without a JOIN. We have a number of these kinds of tests, and they all work fine, too.

      However, other queries involving ISCHILDNODE or ISDESCENDANTNODE criteria will not be optimized and thus will be processed as a true JOIN. (We have had no such queries in our tests, which is why we've not discovered this until now.)

      It turns out that there are several bugs. The first is MODE-772, and the second is that the tuple merging logic in the JoinComponent is wrong and will fail every time. And the third is that the query optimizer is incorrectly manipulating the join portions of the query plan, turning the query plan into something that no longer represents the actual query.

      The result is that some valid queries involving non-identity JOIN clauses will parse perfectly but will produce errors upon execution.

      For a more detailed discussion, see the forum reference.

              rhauch Randall Hauch (Inactive)
              rhauch Randall Hauch (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: