For example, if I use UInt8 constant for if condition then only one branch is evaluated:
```sql
SELECT if(1, 'success', throwIf(1, 'Executing FALSE branch'))

┌─'success'─┐
│ success   │
└───────────┘

1 rows in set. Elapsed: 0.003 sec.
```

But if I use some constant expression, then both branches are evaluated:
```sql
SELECT if(empty(''), 'success', throwIf(1, 'Executing FALSE branch'))

0 rows in set. Elapsed: 0.003 sec.

Received exception from server (version 21.12.2):
Code: 395. DB::Exception: Received from localhost:9000. DB::Exception: Executing FALSE branch: While processing if(empty(''), 'success', throwIf(1, 'Executing FALSE branch')). (FUNCTION_THROW_IF_VALUE_IS_NON_ZERO)
```
bool constant_value_bool = false;
        if (field_type == Field::Types::Float64)
            constant_value_bool = static_cast<bool>(constant_field_value.get<Float64>());
        else if (field_type == Field::Types::Int64)
            constant_value_bool = static_cast<bool>(constant_field_value.get<Int64>());
        else if (field_type == Field::Types::UInt64)
            constant_value_bool = static_cast<bool>(constant_field_value.get<UInt64>());
        has_true_constant = has_true_constant || constant_value_bool;
        has_false_constant = has_false_constant || !constant_value_bool;
    }
    ColumnPtr result_column;
    if constexpr (std::is_same_v<Impl, AndImpl>)
    {
        if (has_false_constant)
            result_column = result_type->createColumnConst(0, static_cast<UInt8>(false));
    }
    else if constexpr (std::is_same_v<Impl, OrImpl>)
    {
        if (has_true_constant)
            result_column = result_type->createColumnConst(0, static_cast<UInt8>(true));
    }
    return result_column;
}
template <typename A, typename Op>
struct UnaryOperationImpl
{
    using ResultType = typename Op::ResultType;
    using ArrayA = typename ColumnVector<A>::Container;
    using ArrayC = typename ColumnVector<ResultType>::Container;
    static void NO_INLINE vector(const ArrayA & a, ArrayC & c)