You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "Weston Pace (Jira)" <ji...@apache.org> on 2022/04/22 16:55:00 UTC

[jira] [Created] (ARROW-16286) [C++] SimplifyWithGuarantee does not work with non-deterministic expressions

Weston Pace created ARROW-16286:
-----------------------------------

             Summary: [C++] SimplifyWithGuarantee does not work with non-deterministic expressions
                 Key: ARROW-16286
                 URL: https://issues.apache.org/jira/browse/ARROW-16286
             Project: Apache Arrow
          Issue Type: Improvement
          Components: C++
            Reporter: Weston Pace


If an expression is non-deterministic (e.g. "random") then SimplifyWithGuarantee may incorrectly think it can fold constants.

For example, if the call is {{random()}} then {{SimplifyWithGuarantee}} will detect that all the arguments are constants (or, more accurately, there are zero non-constant arguments) and decide it can execute the expression immediately and fold it into a constant.

We could maybe add a hack for the random case since it is the only nullary function but, in general, we will probably need a way to define functions as "non-deterministic" and prevent constant folding.



--
This message was sent by Atlassian Jira
(v8.20.7#820007)