This function is strange. Looks like the implementation is of low quality.

```
bool isDeterministic() const override { return false; }
bool isDeterministicInScopeOfQuery() const override { return false; }
```
Why it is not deterministic? Missing a comment.

```
String convertToJson(const PODArray<String> & variant_names, const Variants & variants)
{
    FormatSettings settings;

    WriteBufferFromOwnString buf;

    writeCString("{\"data\":[", buf);
    for (size_t i = 0; i < variants.size(); ++i)
    {
        writeCString("{\"variant_name\":", buf);
        writeJSONString(variant_names[i], buf, settings);
        writeCString(",\"x\":", buf);
        writeText(variants[i].x, buf);
        writeCString(",\"y\":", buf);
        writeText(variants[i].y, buf);
        writeCString(",\"beats_control\":", buf);
        writeText(variants[i].beats_control, buf);
        writeCString(",\"to_be_best\":", buf);
        writeText(variants[i].best, buf);
        writeCString("}", buf);
        if (i != variant_names.size() -1)
            writeCString(",", buf);
    }
    writeCString("]}", buf);

    return buf.str();
}
```
It returns unstructured data? :scream: 

As first step we can remove documentation for this function.
CC @nikitamikhaylov 
throw Exception("Second argument for function " + getName() + " must be Constant boolean", ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT);
        if (const ColumnConst * col_const_arr = checkAndGetColumnConst<ColumnArray>(arguments[2].column.get()))
        {
            Array src_arr = col_const_arr->getValue<Array>();
            for (size_t i = 0; i < src_arr.size(); ++i)
            {
                if (src_arr[i].getType() != Field::Types::String)
                    throw Exception("Third argument for function " + getName() + " must be Array of constant strings", ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT);
                variant_names.push_back(src_arr[i].get<const String &>());
            }
        }
        else
            throw Exception("Third argument for function " + getName() + " must be Array of constant strings", ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT);
        if (const ColumnConst * col_const_arr = checkAndGetColumnConst<ColumnArray>(arguments[3].column.get()))
        {
            if (!toFloat64(col_const_arr, xs))
                throw Exception("Forth and fifth Argument for function " + getName() + " must be Array of constant Numbers", ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT);
        }
        else
            throw Exception("Forth argument for function " + getName() + " must be Array of constant numbers", ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT);
        if (const ColumnConst * col_const_arr = checkAndGetColumnConst<ColumnArray>(arguments[4].column.get()))
        {
            if (!toFloat64(col_const_arr, ys))
                throw Exception("Fifth Argument for function " + getName() + " must be Array of constant Numbers", ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT);
        }
        else
            throw Exception("Fifth argument for function " + getName() + " must be Array of constant numbers", ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT);
        if (variant_names.size() != xs.size() || xs.size() != ys.size())
            throw Exception(ErrorCodes::BAD_ARGUMENTS, "Sizes of arguments doesn't match: variant_names: {}, xs: {}, ys: {}", variant_names.size(), xs.size(), ys.size());
        if (variant_names.size() < 2)