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 
{
        if (input_rows_count == 0)
            return ColumnString::create();
        PODArray<Float64> xs, ys;
        PODArray<String> variant_names;
        String dist;
        bool higher_is_better;
        if (const ColumnConst * col_dist = checkAndGetColumnConst<ColumnString>(arguments[0].column.get()))
        {
            dist = col_dist->getDataAt(0).data;
            dist = Poco::toLower(dist);
            if (dist != BETA && dist != GAMMA)
                throw Exception("First argument for function " + getName() + " cannot be " + dist, ErrorCodes::BAD_ARGUMENTS);
        }
        else
            throw Exception("First argument for function " + getName() + " must be Constant string", ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT);
        if (const ColumnConst * col_higher_is_better = checkAndGetColumnConst<ColumnUInt8>(arguments[1].column.get()))
            higher_is_better = col_higher_is_better->getBool(0);
        else