@@ -2,6 +2,7 @@ from typing import Any
22from typing import Generic
33from typing import Optional
44from typing import overload
5+ from typing import Sequence
56from typing import Type
67from typing import TypeVar
78from typing import Union
@@ -35,6 +36,8 @@ _T_co = TypeVar("_T_co", covariant=True)
3536_TE = TypeVar ("_TE" , bound = type_api .TypeEngine [Any ])
3637_FE = TypeVar ("_FE" , bound = FunctionElement [Any ])
3738
39+ _OverByType = Union [ClauseElement , str ]
40+
3841def register_function (
3942 identifier : str , fn : Any , package : str = ...
4043) -> None : ...
@@ -63,8 +66,10 @@ class FunctionElement( # type: ignore[misc]
6366 def clauses (self ) -> ClauseList [Any ]: ...
6467 def over (
6568 self ,
66- partition_by : Optional [ClauseElement ] = ...,
67- order_by : Optional [ClauseElement ] = ...,
69+ partition_by : Optional [
70+ Union [_OverByType , Sequence [_OverByType ]]
71+ ] = ...,
72+ order_by : Optional [Union [_OverByType , Sequence [_OverByType ]]] = ...,
6873 rows : Optional [Any ] = ...,
6974 range_ : Optional [Any ] = ...,
7075 ) -> Over [_TE ]: ...
0 commit comments