Returns whether every function in the expression always produces the same result for the same
inputs, so that the expression can be re-evaluated or moved by the optimizer.
Returns whether a streaming project on a retract stream must materialize the evaluated results
of the expression: when the expression is impure, or when it calls a UDF without
unsafe_skip_materializing_exprs.