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

Intersect and Except query components breaking on successful comparisons

    Details

      Description

      (See #MODE-1594 for prerequisite fix to get to this issue – without applying that fix the parser will break before the query executes and triggers this issue)

      The INTERSECT and EXCEPT operations (and variants with the ALL flag set) are breaking.

      INTERSECT enters an infinite loop upon the first successful compare since it never advances either iterator and the comparison always executes again on the first identical tuples.

      EXCEPT throws an InvalidStateException on the second successful compare in a row, since in that state it will call Iterator.remove() a second time without having advanced.

      None of the three classes extending SetOperationComponent (ExceptComponent, IntersectComponent, UnionComponent) have any test coverage that I noticed. I'm attaching a patch file with fixes to ExceptComponent and IntersectComponent, as well as a (very) basic testcase in a new file SetOperationComponentsTest.java.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  Unassigned
                  Reporter:
                  dmfay Dian Fay
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: