presto-main/src/main/java/io/prestosql/sql/planner/optimizations/QueryCardinalityUtil.java/QueryCardinalityUtil/isAtMostScalar
class QueryCardinalityUtil:    public static boolean isAtMostScalar(PlanNode node)
    {
        return isAtMostScalar(node, noLookup());
    }