presto-main/src/main/java/io/prestosql/sql/planner/optimizations/HashGenerationOptimizer.java/HashGenerationOptimizer/plan
class HashGenerationOptimizer:        private PlanWithProperties plan(PlanNode node, HashComputationSet parentPreference)
        {
            PlanWithProperties result = node.accept(this, parentPreference);
            checkState(
                    result.getNode().getOutputSymbols().containsAll(result.getHashSymbols().values()),
                    "Node %s declares hash symbols not in the output",
                    result.getNode().getClass().getSimpleName());
            return result;
        }