You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "Ben Kietzman (Jira)" <ji...@apache.org> on 2021/11/16 16:11:00 UTC

[jira] [Created] (ARROW-14725) [C++][Compute] Extract Expression simplification passes to an extensible registry

Ben Kietzman created ARROW-14725:
------------------------------------

             Summary: [C++][Compute] Extract Expression simplification passes to an extensible registry
                 Key: ARROW-14725
                 URL: https://issues.apache.org/jira/browse/ARROW-14725
             Project: Apache Arrow
          Issue Type: Improvement
          Components: C++
            Reporter: Ben Kietzman
             Fix For: 7.0.0


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.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)