Skip to content
This repository has been archived by the owner on Nov 22, 2022. It is now read-only.

Commit

Permalink
Fix two-argument math functions
Browse files Browse the repository at this point in the history
  • Loading branch information
Johannes Huber committed Jul 9, 2019
1 parent eee964a commit eeb854b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion third_party/3/pyspark/sql/_typing.pyi
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import Any, List, Optional, TypeVar, Union
from typing import Any, List, Optional, TypeVar, Union, SupportsFloat
from typing_extensions import Protocol
import datetime
import decimal
Expand All @@ -7,6 +7,7 @@ import pyspark.sql.column
import pyspark.sql.types

ColumnOrName = Union[pyspark.sql.column.Column, str]
ColumnNameOrFloat = Union[ColumnOrName, SupportsFloat]
DecimalLiteral = decimal.Decimal
DateTimeLiteral = Union[datetime.datetime, datetime.date]
LiteralType = Union[bool, int, float, str]
Expand Down
8 changes: 4 additions & 4 deletions third_party/3/pyspark/sql/functions.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ from typing import Any, Optional, Union, Dict, Callable
import pandas.core.frame # type: ignore
import pandas.core.series # type: ignore

from pyspark.sql._typing import ColumnOrName
from pyspark.sql._typing import ColumnOrName, ColumnNameOrFloat
from pyspark.sql.column import Column
from pyspark.sql.dataframe import DataFrame
from pyspark.sql.types import ArrayType, DataType, StructField, StructType
Expand Down Expand Up @@ -159,7 +159,7 @@ def asc_nulls_last(col: ColumnOrName) -> Column: ...
def ascii(col: ColumnOrName) -> Column: ...
def asin(col: ColumnOrName) -> Column: ...
def atan(col: ColumnOrName) -> Column: ...
def atan2(col1: ColumnOrName, col2: ColumnOrName) -> Column: ...
def atan2(col1: ColumnNameOrFloat, col2: ColumnNameOrFloat) -> Column: ...
def avg(col: ColumnOrName) -> Column: ...
def base64(col: ColumnOrName) -> Column: ...
def bitwiseNOT(col: ColumnOrName) -> Column: ...
Expand All @@ -181,7 +181,7 @@ def desc_nulls_last(col: ColumnOrName) -> Column: ...
def exp(col: ColumnOrName) -> Column: ...
def expm1(col: ColumnOrName) -> Column: ...
def floor(col: ColumnOrName) -> Column: ...
def hypot(col1: ColumnOrName, col2: ColumnOrName) -> Column: ...
def hypot(col1: ColumnNameOrFloat, col2: ColumnNameOrFloat) -> Column: ...
def kurtosis(col: ColumnOrName) -> Column: ...
def lit(col: Any) -> Column: ...
def log10(col: ColumnOrName) -> Column: ...
Expand All @@ -192,7 +192,7 @@ def max(col: ColumnOrName) -> Column: ...
def mean(col: ColumnOrName) -> Column: ...
def min(col: ColumnOrName) -> Column: ...
def percent_rank() -> Column: ...
def pow(col1: ColumnOrName, col2: Union[ColumnOrName, float]) -> Column: ...
def pow(col1: ColumnNameOrFloat, col2: ColumnNameOrFloat) -> Column: ...
def radians(col: ColumnOrName) -> Column: ...
def rank() -> Column: ...
def rint(col: ColumnOrName) -> Column: ...
Expand Down

0 comments on commit eeb854b

Please sign in to comment.