擅长:python、mysql、java
<p>每次一行的新语法per Databricks(Spark)(语法更符合Pandas UDF,这似乎是UDF在python<a href="https://databricks.com/blog/2017/10/30/introducing-vectorized-udfs-for-pyspark.html" rel="nofollow noreferrer">https://databricks.com/blog/2017/10/30/introducing-vectorized-udfs-for-pyspark.html</a>)中的发展方向:</p>
<p>一次一行:</p>
<pre><code>@udf(ArrayType(IntegerType()))
def new_tuple(x):
return [2*e for e in x]
</code></pre>