Skip to content

Commit 5fb08d6

Browse files
committed
Updated the internal ScalarUDF.udf helper signatures so IDEs and type checkers surface support for pyarrow.Field inputs when defining UDFs
1 parent e0bce84 commit 5fb08d6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

python/datafusion/user_defined.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ def double_udf(x):
262262

263263
def _function(
264264
func: Callable[..., Any],
265-
input_types: list[pa.DataType],
265+
input_types: list[pa.DataType | pa.Field],
266266
return_type: pa.DataType | pa.Field,
267267
volatility: Volatility | str,
268268
name: Optional[str] = None,
@@ -284,7 +284,7 @@ def _function(
284284
)
285285

286286
def _decorator(
287-
input_types: list[pa.DataType],
287+
input_types: list[pa.DataType | pa.Field],
288288
return_type: pa.DataType | pa.Field,
289289
volatility: Volatility | str,
290290
name: Optional[str] = None,

0 commit comments

Comments
 (0)