**Describe the situation**
There is a setting `optimize_move_functions_out_of_any` that is turn on by default.
It moves functions out of `any` aggregate function.
But it's not always beneficial.

Example:
```
any(substring(large_string, 1, 10))
```
is better than
```
substring(any(large_string), 1, 10)
```

///     │                                       │
            ///     └────────┴────────────────────────────────────┘
            /// While should be:
            ///     ┌─number─┬─any(arrayJoin(array(array(), array())))─┐
            ///     │                                            │
            ///     └────────┴─────────────────────────────────────────┘
            if (arg_func->name == "arrayJoin")
                return false;
            if (arg_func->name == "lambda")
                return false;
            // We are looking for identifiers inside a function calculated inside
            // the aggregate function `any()`. Window or aggregate function can't
            // be inside `any`, but this check in GetAggregatesMatcher happens
            /
            if (arg_func->is_window_function
                || AggregateFunctionFactory::instance().isAggregateFunctionName(
                    arg_func->name))
            {
                return false;
            }
            if (!extractIdentifiers(*arg_func, identifiers))
                return false;
        }
        else if (arg->as<ASTIdentifier>())
            identifiers.emplace(&arg);
    }
    return true;
}
}
void RewriteAnyFunctionMatcher::visit(ASTPtr & ast, Data & data)