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

RelMdPredicates.getPredicates is slow if there are many equivalent columns

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.15.0
    • core
    • 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

              julianhyde Julian Hyde
              perid007 LeoWangLZ
              Votes:
              0 Vote for this issue
              Watchers:
              2 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