Skip to content

Commit 1e4e350

Browse files
committed
fix: update arrow_cast function to accept Expr type for data_type parameter
1 parent 20cc781 commit 1e4e350

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

python/datafusion/functions.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1100,9 +1100,9 @@ def arrow_typeof(arg: Expr) -> Expr:
11001100
return Expr(f.arrow_typeof(arg.expr))
11011101

11021102

1103-
def arrow_cast(expr: Expr, data_type: str) -> Expr:
1103+
def arrow_cast(expr: Expr, data_type: Expr) -> Expr:
11041104
"""Casts an expression to a specified data type."""
1105-
return Expr(f.arrow_cast(expr.expr, data_type))
1105+
return Expr(f.arrow_cast(expr.expr, data_type.expr))
11061106

11071107

11081108
def random() -> Expr:

0 commit comments

Comments
 (0)