Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-4621

SemiJoinRule throws AssertionError on ANTI join

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    Description

      Credits to Thomas Rebele for discovering the issue.

      When SemiJoinRule (both CoreRules.JOIN_TO_SEMI_JOIN and CoreRules.PROJECT_TO_SEMI_JOIN) matches an ANTI join, it fails with the following error:

      java.lang.AssertionError: ANTI
        at org.apache.calcite.rel.rules.SemiJoinRule.perform(SemiJoinRule.java:122)
        ...
      

      The problem is that the rule config only forbids RIGHT and FULL joins, and lets ANTI go through. Later when the rule is actually executed, joins with type ANTI cannot be handled, hence the AssertionError.
      The rule config must be adapted to forbid also ANTI joins.

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            rubenql Ruben Q L
            rubenql Ruben Q L
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 1h 10m
                1h 10m

                Slack

                  Issue deployment