presto-main/src/main/java/io/prestosql/operator/exchange/LocalExchange.java/LocalExchange/checkAllSinksComplete
class LocalExchange:    private void checkAllSinksComplete()
    {
        checkNotHoldsLock(this);

        synchronized (this) {
            if (!noMoreSinkFactories || !openSinkFactories.isEmpty() || !sinks.isEmpty()) {
                return;
            }
        }

        sources.forEach(LocalExchangeSource::finish);
    }