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

The distinct row count and population size for constant columns should be 1

    XMLWordPrintableJSON

Details

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

    Description

      Suppose we have a relation with 3 columns: (a, '1', '2'). The first column comes from an underlying table, while the other two columns are constants.

      For this relation, we should have NDV(1) = 1, since column 1 is a constant, which have only one possible value (suppose the column index starts from 0).

      Similarly, we should have NDV(1, 2) = 1, since both columns are constants.

      We should also have NDV(0, 1) == NDV(0), because the number of distinct values depends on the non-const column, which is a from the underlying table.

      Attachments

        Issue Links

          Activity

            People

              fan_li_ya Liya Fan
              fan_li_ya Liya Fan
              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 - 50m
                  50m