Skip to content

Commit 308e774

Browse files
committed
Refactor type alias for PyArrowArray to use Union for better clarity
1 parent 1baa2b7 commit 308e774

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
@@ -22,14 +22,14 @@
2222
import functools
2323
from abc import ABCMeta, abstractmethod
2424
from enum import Enum
25-
from typing import Any, Callable, Optional, Protocol, Sequence, TypeVar, cast, overload
25+
from typing import Any, Callable, Optional, Protocol, Sequence, TypeVar, Union, cast, overload
2626

2727
import pyarrow as pa
2828

2929
import datafusion._internal as df_internal
3030
from datafusion.expr import Expr
3131

32-
PyArrowArray = pa.Array | pa.ChunkedArray
32+
PyArrowArray = Union[pa.Array, pa.ChunkedArray]
3333
# Type alias for array batches exchanged with Python scalar UDFs.
3434
PyArrowArrayT = TypeVar("PyArrowArrayT", pa.Array, pa.ChunkedArray)
3535

0 commit comments

Comments
 (0)