https://gh-api.clickhouse.tech/play?user=play#U0VMRUNUIHRvU3RhcnRPZk1vbnRoKGNyZWF0ZWRfYXQpIEFTIGRhdGUsIGNvdW50KCksIHVuaXEoYWN0b3JfbG9naW4pIEFTIHUsIGJhcih1LCAwLCAxMDAwLCAxMDApIEZST00gZ2l0aHViX2V2ZW50cyAKV0hFUkUgcmVwb19uYW1lIElOICgneWFuZGV4L0NsaWNrSG91c2UnLCAnQ2xpY2tIb3VzZS9DbGlja0hvdXNlJykgCiAgQU5EIGV2ZW50X3R5cGUgPSAnSXNzdWVDb21tZW50RXZlbnQnCiAgQU5EIGFjdG9yX2xvZ2luIE5PVCBMSUtFICdyb2JvdC0lJyBBTkQgYWN0b3JfbG9naW4gTk9UIExJS0UgJyVbYm90XScKR1JPVVAgQlkgZGF0ZSBPUkRFUiBCWSBkYXRl

```
SELECT toStartOfMonth(created_at) AS date, count(), uniq(actor_login) AS u, bar(u, 0, 1000, 100) FROM github_events 
WHERE repo_name IN ('yandex/ClickHouse', 'ClickHouse/ClickHouse') 
  AND event_type = 'IssueCommentEvent'
  AND actor_login NOT LIKE 'robot-%' AND actor_login NOT LIKE '%[bot]'
GROUP BY date ORDER BY date
```

```
Code: 44. DB::Exception: Cannot convert column ColumnLowCardinality to mask.: while executing 'FUNCTION and(notLike(actor_login, 'robot-%') :: 3, notLike(actor_login, '%[bot]') :: 1) -> and(notLike(actor_login, 'robot-%'), notLike(actor_login, '%[bot]')) UInt8 : 2': While executing MergeTreeThread. (ILLEGAL_COLUMN) (version 21.11.1.8052 (official build))
```
{
    const auto * column_function = checkAndGetShortCircuitArgument(column.column);
    if (!column_function)
        return;
    if (!empty)
        column = column_function->reduce();
    else
        column.column = column_function->getResultType()->createColumn();
}
int checkShirtCircuitArguments(const ColumnsWithTypeAndName & arguments)
{
    int last_short_circuit_argument_index = -1;
    for (size_t i = 0; i != arguments.size(); ++i)
    {
        if (checkAndGetShortCircuitArgument(arguments[i].column))
            last_short_circuit_argument_index = i;
    }
    return last_short_circuit_argument_index;
}
void copyMask(const PaddedPODArray<UInt8> & from, PaddedPODArray<UInt8> & to)
{
    if (from.size() != to.size())
        throw Exception("Cannot copy mask, because source and destination have different size", ErrorCodes::LOGICAL_ERROR);
    if (from.empty())
        return;
    memcpy(to.data(), from.data(), from.size() * sizeof(*from.data()));
}
}