📅  最后修改于: 2022-03-11 15:00:01.027000             🧑  作者: Mango
from pyspark.sql.types import LongType
def squared_typed(s):
return s * s
spark.udf.register("squaredWithPython", squared_typed, LongType())