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 
scale = 250.0 / (1 + 250.0 * ys[i]);
            std::vector<Float64> samples = stats::rgamma<std::vector<Float64>>(r, c, shape, scale);
            for (auto & sample : samples)
                sample = 1 / sample;
            samples_matrix.emplace_back(std::move(samples));
        }
    }
    PODArray<Float64> means;
    for (auto & samples : samples_matrix)
    {
        Float64 total = 0.0;
        for (auto sample : samples)
            total += sample;
        means.push_back(total / samples.size());
    }
    
    for (size_t i = 1; i < xs.size(); ++i)
    {
        for (size_t n = 0; n < r * c; ++n)
        {
            if (higher_is_better)
            {
                if (samples_matrix[i][n] > samples_matrix[0][n])
                    ++variants[i].beats_control;
            }
            else
            {
                if (samples_matrix[i][n] < samples_matrix[0][n])
                    ++variants[i].beats_control;
            }