Description
PySpark SQL supports casting using data type strings.
from pyspark.sql.functions import col col("foo").cast("integer")
It should be possible to do the same with udf / UserDefinedFunction:
from pyspark.sql import udf udf(lambda x: x + 1, "integer")