File tree Expand file tree Collapse file tree 2 files changed +4
-6
lines changed
Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Original file line number Diff line number Diff 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 : Expr ) -> Expr :
1103+ def arrow_cast (expr : Expr , data_type : str ) -> Expr :
11041104 """Casts an expression to a specified data type."""
1105- return Expr (f .arrow_cast (expr .expr , data_type . expr ))
1105+ return Expr (f .arrow_cast (expr .expr , data_type ))
11061106
11071107
11081108def random () -> Expr :
Original file line number Diff line number Diff line change @@ -907,10 +907,8 @@ def test_temporal_functions(df):
907907
908908def test_arrow_cast (df ):
909909 df = df .select (
910- f .arrow_cast (column ("a" ), literal ("Float64" ).cast (pa .string ())).alias (
911- "a_as_float"
912- ),
913- f .arrow_cast (column ("a" ), literal ("Int32" ).cast (pa .string ())).alias ("a_as_int" ),
910+ f .arrow_cast (column ("a" ), "Float64" ).alias ("a_as_float" ),
911+ f .arrow_cast (column ("a" ), "Int32" ).alias ("a_as_int" ),
914912 )
915913 result = df .collect ()
916914 assert len (result ) == 1
You can’t perform that action at this time.
0 commit comments