```sql
SELECT sumIF(1, 0)

Query id: 3a3db9bd-b0ad-4d2f-bd8b-39daeda0546c

┌─countIf(0)─┐
│          0 │
└────────────┘

1 rows in set. Elapsed: 0.244 sec. 
```
is OK.

```sql
CREATE TABLE agg
ENGINE = AggregatingMergeTree
ORDER BY tuple() AS
SELECT
    t,
    sumIF(n, 0)
FROM data
GROUP BY t

Query id: f47b729e-c574-4978-b565-aa805b7b896f


0 rows in set. Elapsed: 0.009 sec. 

Received exception from server (version 21.13.1):
Code: 46. DB::Exception: Received from localhost:9000. DB::Exception: Unknown function sumIF: While processing t, sumIF(n, 0). (UNKNOWN_FUNCTION)
```
#include <AggregateFunctions/AggregateFunctionFactory.h>
#include <Interpreters/RewriteSumIfFunctionVisitor.h>
#include <Parsers/ASTFunction.h>
#include <Parsers/ASTLiteral.h>
#include <Common/typeid_cast.h>
namespace DB
{
void RewriteSumIfFunctionMatcher::visit(ASTPtr & ast, Data & data)
{
    if (auto * func = ast->as<ASTFunction>())
    {
        if (func->is_window_function)
            return;
        visit(*func, ast, data);
    }
}
void RewriteSumIfFunctionMatcher::visit(const ASTFunction & func, ASTPtr & ast, Data &)