presto-main/src/main/java/io/prestosql/sql/gen/FunctionCallCodeGenerator.java/FunctionCallCodeGenerator/generateExpression
class FunctionCallCodeGenerator:    @Override
    public BytecodeNode generateExpression(ResolvedFunction resolvedFunction, BytecodeGeneratorContext context, Type returnType, List<RowExpression> arguments)
    {
        Metadata metadata = context.getMetadata();

        ScalarFunctionImplementation function = metadata.getScalarFunctionImplementation(resolvedFunction);

        List<BytecodeNode> argumentsBytecode = new ArrayList<>();
        for (int i = 0; i < arguments.size(); i++) {
            RowExpression argument = arguments.get(i);
            ScalarFunctionImplementation.ArgumentProperty argumentProperty = function.getArgumentProperty(i);
            if (argumentProperty.getArgumentType() == VALUE_TYPE) {
                argumentsBytecode.add(context.generate(argument));
            }
            else {
                argumentsBytecode.add(context.generate(argument, Optional.of(argumentProperty.getLambdaInterface())));
            }
        }

        return context.generateCall(
                resolvedFunction.getSignature().getName(),
                function,
                argumentsBytecode);
    }