Skip to content

Commit dcb9e25

Browse files
committed
Add text to user documentation on passing field information for scalar UDFs
1 parent 8479e55 commit dcb9e25

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

docs/source/user-guide/common-operations/udf-and-udfa.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,11 @@ converting to Python objects to do the evaluation.
9090
9191
df.select(col("a"), is_null_arr(col("a")).alias("is_null")).show()
9292
93+
In this example we passed the PyArrow ``DataType`` when we defined the function
94+
by calling ``udf()``. If you need additional control, such as specifying
95+
metadata or nullability of the input or output, you can instead specify a
96+
PyArrow ``Field``.
97+
9398
If you need to write a custom function but do not want to incur the performance
9499
cost of converting to Python objects and back, a more advanced approach is to
95100
write Rust based UDFs and to expose them to Python. There is an example in the

0 commit comments

Comments
 (0)