Uploaded image for project: 'Apache Arrow'
  1. Apache Arrow
  2. ARROW-14725

[C++][Compute] Extract Expression simplification passes to an extensible registry

    XMLWordPrintableJSON

Details

    Description

      Currenly, SimplifyWithGuarantee makes a hard-coded set of passes over an input expression. This not ideal for maintenance or extension of built-in simplification passes. Furthermore, it renders optimization of non-built-in function calls awkward or impossible.

      Instead it would be preferable to provide an extensible registry of optimization passes to clarify and regularize addition of new passes.

      LLVM's extensive optimization framework can offer inspiration here:
      https://llvm.org/docs/WritingAnLLVMPass.html#pass-classes-and-requirements
      LLVM passes come with several levels of access and can declare invalidation and pre-requirement relationships with other passes.

      in the case of expression optimization in arrow, even a minimal registry of passes will require at least two types of pass: one which operates given a guarantee like a partition expression and one which operates independently.

      I'm not sure if it makes sense to include cost based optimizations in this registry (currently only rule based optimizations are provided), but I think it's worth mentioning them here at least.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              bkietz Ben Kietzman
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m