class PolymorphicScalarFunction extends SqlScalarFunction {

    @Override
    protected ScalarFunctionImplementation specialize(FunctionBinding functionBinding)
    {
        ImmutableList.Builder<ScalarImplementationChoice> implementationChoices = ImmutableList.builder();

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

        return new ChoicesScalarFunctionImplementation(functionBinding, implementationChoices.build());
    }

      PolymorphicScalarFunction(FunctionMetadata functionMetadata, List<PolymorphicScalarFunctionChoice> choices);

}