presto-main/src/main/java/io/prestosql/operator/StatisticsWriterOperator.java/StatisticsWriterOperator/getOutput
class StatisticsWriterOperator:    @Override
    public Page getOutput()
    {
        if (state != State.FINISHING) {
            return null;
        }
        state = State.FINISHED;

        Collection<ComputedStatistics> computedStatistics = computedStatisticsBuilder.build();
        statisticsWriter.writeStatistics(computedStatistics);

        // output page will only be constructed once,
        // so a new PageBuilder is constructed (instead of using PageBuilder.reset)
        PageBuilder page = new PageBuilder(1, TYPES);
        page.declarePosition();
        BlockBuilder rowsBuilder = page.getBlockBuilder(0);
        if (rowCountEnabled) {
            BIGINT.writeLong(rowsBuilder, getRowCount(computedStatistics));
        }
        else {
            rowsBuilder.appendNull();
        }

        return page.build();
    }