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

Improve metadata row count for Join

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.26.0
    • core

    Description

      Currently, the default metadata row count for join RelMdRowCount#getRowCount(Join rel, RelMetadataQuery mq) relies on RelMdUtil.getJoinRowCount. This method has several issues:

      • In case of ANTI join, it returns the same estimation as a SEMI join
      • In other cases (INNER, LEFT, RIGHT, FULL), it returns always the same formula:
        leftRowCount * rightRowCount * mq.getSelectivity(join, condition)
        which seems valid for an INNER join, but not for LEFT / RIGHT / FULL.

      Attachments

        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:
            3 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 40m
                1h 40m

                Slack

                  Issue deployment