Uploaded image for project: 'Apache Drill'
  1. Apache Drill
  2. DRILL-2060

Support constant folding in expressions in Filter

    XMLWordPrintableJSON

    Details

      Description

      If one side of a filter condition is a constant expression, we should be able to evaluate the expression in the planning phase and replace the expression with the constant value.

      For example, the following filter
      Where shipdate < date '1997-01-01' + interval '1' year
      can be re-written as
      Where shipdate < date '1998-01-01'

      Or
      Where age + 5 < 42
      can be re-written as
      Where age < 37

        Attachments

        1. DRILL-2060-15-mar-15.patch
          43 kB
          Jason Altekruse
        2. DRILL-2060-part1-const-folding-feb-27.patch
          84 kB
          Jason Altekruse
        3. DRILL-2060-part2-const-folding-feb-27.patch
          51 kB
          Jason Altekruse
        4. DRILL-2060-const-folding-feb-6.diff
          41 kB
          Jason Altekruse
        5. DRILL-2060.patch
          77 kB
          Jason Altekruse

          Issue Links

            Activity

              People

              • Assignee:
                jaltekruse Jason Altekruse
                Reporter:
                adityakishore Aditya Kishore
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: