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

RelMdPredicates.getPredicates is slow if there are many equivalent columns

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.15.0
    • Component/s: core
    • Labels:
      None

      Description

      When inferring pulled up predicates, multiple mappings are generated to
      make sure equivalent expressions can be substitute. E.g., for an expression
      'a + b + c' and the following equivalences:

      a : {a, b}
      b : {a, b}
      c : {c, e}
      

      should generate:

      a + a + c
      a + a + e
      a + b + c
      a + b + e
      b + a + c
      b + a + e
      b + b + c
      b + b + e
      

      The mapping generation is a typical permutation generation process. However,
      the current code is not handling the permutation well, thus causing duplicated
      mappings.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                julianhyde Julian Hyde
                Reporter:
                perid007 LeoWangLZ
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

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