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

Statistics.of() instance doesn't acknowledge super sets of keys

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Invalid
    • Affects Version/s: None
    • Fix Version/s: 1.12.0
    • Component/s: core
    • Labels:
      None

      Description

      The default instance of Statistic returned by Statistics.of() doesn't acknowledge keys which contain other keys.

            public boolean isKey(ImmutableBitSet columns) {
              for (ImmutableBitSet key : keys) {
                if (columns.contains(key)) {
                  return true;
                }
              }
              return false;
            }
      

      This test should also return true for bit sets which subsume a key, e.g. if A is a key then AB is also a key.

        Attachments

          Activity

            People

            • Assignee:
              julianhyde Julian Hyde
              Reporter:
              jbalint@gmail.com Jess Balint
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: