Skip to content

Commit 23d6c0c

Browse files
committed
Minor typo fixes
1 parent f68c0ef commit 23d6c0c

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

python/datafusion/udf.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -136,14 +136,14 @@ class udf:
136136
137137
Example:
138138
**Using `udf` as a function:**
139-
```python
139+
```
140140
def double_func(x):
141141
return x * 2
142142
double_udf = udf(double_func, [pyarrow.int32()], pyarrow.int32(), "volatile", "double_it")
143143
```
144144
145145
**Using `udf` as a decorator:**
146-
```python
146+
```
147147
@udf([pyarrow.int32()], pyarrow.int32(), "volatile", "double_it")
148148
def double_udf(x):
149149
return x * 2
@@ -322,19 +322,17 @@ def udf4() -> Summarize:
322322
323323
Args:
324324
accum: The accumulator python function. **Only needed when calling as a function. Skip this argument when using `udaf` as a decorator.**
325-
input_types: The data types of the arguments to `accum.
325+
input_types: The data types of the arguments to ``accum``.
326326
return_type: The data type of the return value.
327327
state_type: The data types of the intermediate accumulation.
328-
volatility: See :py:class:Volatility for allowed values.
328+
volatility: See :py:class:`Volatility` for allowed values.
329329
name: A descriptive name for the function.
330330
331331
Returns:
332332
A user-defined aggregate function, which can be used in either data
333333
aggregation or window function calls.
334334
"""
335335

336-
337-
338336
def __new__(cls, *args, **kwargs):
339337
if args and callable(args[0]):
340338
# Case 1: Used as a function, require the first parameter to be callable

0 commit comments

Comments
 (0)