presto-main/src/main/java/io/prestosql/sql/planner/planprinter/PlanPrinter.java/PlanPrinter/unresolveFunctions
class PlanPrinter:    private static Expression unresolveFunctions(Expression expression)
    {
        return ExpressionTreeRewriter.rewriteWith(new ExpressionRewriter<Void>()
        {
            @Override
            public Expression rewriteFunctionCall(FunctionCall node, Void context, ExpressionTreeRewriter<Void> treeRewriter)
            {
                FunctionCall rewritten = treeRewriter.defaultRewrite(node, context);

                return ResolvedFunction.fromQualifiedName(node.getName())
                        .map(function -> new FunctionCall(
                                rewritten.getLocation(),
                                QualifiedName.of(function.getSignature().getName()),
                                rewritten.getWindow(),
                                rewritten.getFilter(),
                                rewritten.getOrderBy(),
                                rewritten.isDistinct(),
                                rewritten.getNullTreatment(),
                                rewritten.getArguments()))
                        .orElse(rewritten);
            }
        }, expression);
    }