public FunctionImplementation<Function> getForTypes(List<DataType> dataTypes) throws IllegalArgumentException {
Preconditions.checkArgument(dataTypes.size() == 1, "Invalid number of arguments");
Preconditions.checkArgument(DataTypes.isCollectionType(dataTypes.get(0)), "Argument must be a collection type");
ArrayType arrayType = (ArrayType) dataTypes.get(0);
// TODO: support geo inner types
Preconditions.checkArgument(DataTypes.PRIMITIVE_TYPES.contains(arrayType.innerType()),
String.format(Locale.ENGLISH, "Array inner type '%s' not supported for conversion",
arrayType.innerType().getName()));
return new ToStringArrayFunction(createInfo(dataTypes));
}
}