presto-main/src/main/java/io/prestosql/metadata/PolymorphicScalarFunction.java/PolymorphicScalarFunction/specialize
class PolymorphicScalarFunction:    @Override
    public ScalarFunctionImplementation specialize(BoundVariables boundVariables, int arity, Metadata metadata)
    {
        ImmutableList.Builder<ScalarImplementationChoice> implementationChoices = ImmutableList.builder();

        for (PolymorphicScalarFunctionChoice choice : choices) {
            implementationChoices.add(getScalarFunctionImplementationChoice(boundVariables, metadata, choice));
        }

        return new ScalarFunctionImplementation(implementationChoices.build());
    }