```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)
```
{
    if (!func.arguments || func.arguments->children.empty())
        return;
    auto lower_name = Poco::toLower(func.name);
    if (lower_name != "sum" && lower_name != "sumif")
        return;
    const auto & func_arguments = func.arguments->children;
    if (lower_name == "sumif")
    {
        
        const auto * literal = func_arguments[0]->as<ASTLiteral>();
        if (!literal || !DB::isInt64OrUInt64FieldType(literal->value.getType()))
            return;
        if (func_arguments.size() == 2 && literal->value.get<UInt64>() == 1)
        {
            auto new_func = makeASTFunction("countIf", func_arguments[1]);
            new_func->setAlias(func.alias);
            ast = std::move(new_func);
            return;
        }
    }
    else
    {
        const auto * nested_func = func_arguments[0]->as<ASTFunction>();
        if (!nested_func || Poco::toLower(nested_func->name) != "if" || nested_func->arguments->children.size() != 3)
            return;
        const auto & if_arguments = nested_func->arguments->children;