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

Extend SubstitutionVisitor.splitFilter to cover different order of operands

    Details

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

      Description

      SubstitutionVisitor.splitFilter does structural comparison to identify relevant predicates. The method could sort the operands for some expressions in a deterministic way to maximize possible matches.

      For instance, currently this example yields correct results:

      condition: x = 1 or y = 2
      target:    y = 2 or x = 1
      -> residue:   true
      

      However, the following equivalent example fails:

      condition: x = 1 or y = 2
      target:    y = 2 or 1 = x
      

        Attachments

          Activity

            People

            • Assignee:
              jcamachorodriguez Jesus Camacho Rodriguez
              Reporter:
              jcamachorodriguez Jesus Camacho Rodriguez
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: