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

Improve metadata row count for Join

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.26.0
    • Component/s: 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

          Issue Links

            Activity

              People

              • Assignee:
                rubenql Ruben Q L
                Reporter:
                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