presto-main/src/main/java/io/prestosql/sql/planner/iterative/rule/ImplementExceptAsUnion.java/ImplementExceptAsUnion/apply
class ImplementExceptAsUnion:    @Override
    public Result apply(ExceptNode node, Captures captures, Context context)
    {
        SetOperationNodeTranslator translator = new SetOperationNodeTranslator(metadata, context.getSymbolAllocator(), context.getIdAllocator());
        SetOperationNodeTranslator.TranslationResult result = translator.makeSetContainmentPlan(node);

        ImmutableList.Builder<Expression> predicatesBuilder = ImmutableList.builder();
        List<Expression> presentExpression = result.getPresentExpressions();
        predicatesBuilder.add(getFirst(presentExpression, null));
        for (int i = 1; i < presentExpression.size(); i++) {
            predicatesBuilder.add(new NotExpression(presentExpression.get(i)));
        }

        return Result.ofPlanNode(
                new ProjectNode(
                        context.getIdAllocator().getNextId(),
                        new FilterNode(context.getIdAllocator().getNextId(), result.getPlanNode(), and(predicatesBuilder.build())),
                        Assignments.identity(node.getOutputSymbols())));
    }