Skip to content

Commit e61040f

Browse files
committed
Narrow public interface of methods
1 parent 4d758bb commit e61040f

1 file changed

Lines changed: 13 additions & 13 deletions

File tree

python/datafusion/functions.py

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1442,7 +1442,7 @@ def radians(arg: Expr) -> Expr:
14421442

14431443

14441444
def regexp_like(
1445-
string: Expr, regex: Expr | Any, flags: Expr | Any | None = None
1445+
string: Expr, regex: Expr | str, flags: Expr | str | None = None
14461446
) -> Expr:
14471447
r"""Find if any regular expression (regex) matches exist.
14481448
@@ -1476,7 +1476,7 @@ def regexp_like(
14761476

14771477

14781478
def regexp_match(
1479-
string: Expr, regex: Expr | Any, flags: Expr | Any | None = None
1479+
string: Expr, regex: Expr | str, flags: Expr | str | None = None
14801480
) -> Expr:
14811481
r"""Perform regular expression (regex) matching.
14821482
@@ -1511,9 +1511,9 @@ def regexp_match(
15111511

15121512
def regexp_replace(
15131513
string: Expr,
1514-
pattern: Expr | Any,
1515-
replacement: Expr | Any,
1516-
flags: Expr | Any | None = None,
1514+
pattern: Expr | str,
1515+
replacement: Expr | str,
1516+
flags: Expr | str | None = None,
15171517
) -> Expr:
15181518
r"""Replaces substring(s) matching a PCRE-like regular expression.
15191519
@@ -1555,9 +1555,9 @@ def regexp_replace(
15551555

15561556
def regexp_count(
15571557
string: Expr,
1558-
pattern: Expr | Any,
1559-
start: Expr | Any | None = None,
1560-
flags: Expr | Any | None = None,
1558+
pattern: Expr | str,
1559+
start: Expr | str | None = None,
1560+
flags: Expr | str | None = None,
15611561
) -> Expr:
15621562
"""Returns the number of matches in a string.
15631563
@@ -1594,11 +1594,11 @@ def regexp_count(
15941594

15951595
def regexp_instr(
15961596
values: Expr,
1597-
regex: Expr | Any,
1598-
start: Expr | Any | None = None,
1599-
n: Expr | Any | None = None,
1600-
flags: Expr | Any | None = None,
1601-
sub_expr: Expr | Any | None = None,
1597+
regex: Expr | str,
1598+
start: Expr | str | None = None,
1599+
n: Expr | str | None = None,
1600+
flags: Expr | str | None = None,
1601+
sub_expr: Expr | str | None = None,
16021602
) -> Expr:
16031603
r"""Returns the position of a regular expression match in a string.
16041604

0 commit comments

Comments
 (0)