presto-main/src/main/java/io/prestosql/cost/EnforceSingleRowStatsRule.java/EnforceSingleRowStatsRule/doCalculate
class EnforceSingleRowStatsRule:    @Override
    protected Optional<PlanNodeStatsEstimate> doCalculate(EnforceSingleRowNode node, StatsProvider sourceStats, Lookup lookup, Session session, TypeProvider types)
    {
        return Optional.of(PlanNodeStatsEstimate.buildFrom(sourceStats.getStats(node.getSource()))
                .setOutputRowCount(1)
                .build());
    }