
**Describe the bug**
See the code in `Pipe.cpp`. The logic of `if` not consistent with the logs below.  Can `checkSource` be passed when `source.getOutputs().size() == 2` ? 
```
static void checkSource(const IProcessor & source)
{
    ......
    if (source.getOutputs().size() > 1)
        throw Exception("Source for pipe should have single or two outputs, but " + source.getName() + " has " +
                        toString(source.getOutputs().size()) + " outputs.", ErrorCodes::LOGICAL_ERROR);
}
``` 



if (totals && totals_port)
        throw Exception("Cannot add transform with totals to Pipe because it already has totals.",
                        ErrorCodes::LOGICAL_ERROR);
    if (extremes && extremes_port)
        throw Exception("Cannot add transform with extremes to Pipe because it already has extremes.",
                        ErrorCodes::LOGICAL_ERROR);
    if (totals)
        totals_port = totals;
    if (extremes)
        extremes_port = extremes;
    size_t next_output = 0;
    for (auto & input : inputs)
    {
        connect(*output_ports[next_output], input);
        ++next_output;
    }
    auto & outputs = transform->getOutputs();
    output_ports.clear();
    output_ports.reserve(outputs.size());
    bool found_totals = false;
    bool found_extremes = false;
    for (auto & output : outputs)
    {
        if (&output == totals)
            found_totals = true;
        else if (&output == extremes)
            found_extremes = true;
        else
            output_ports.emplace_back(&output);
    }