File tree Expand file tree Collapse file tree 1 file changed +3
-8
lines changed
Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Original file line number Diff line number Diff line change 2323
2424from datafusion import SessionContext , column
2525from datafusion import functions as f
26- from datafusion import literal , Expr
26+ from datafusion import literal
2727
2828np .seterr (invalid = "ignore" )
2929
@@ -905,15 +905,10 @@ def test_temporal_functions(df):
905905 )
906906
907907
908- def utf8_literal (value : str ) -> Expr :
909- """Creates a new expression representing a UTF8 literal value."""
910- return literal (pa .scalar (value , type = pa .string ()))
911-
912-
913908def test_arrow_cast (df ):
914909 df = df .select (
915- f .arrow_cast (column ("a" ), utf8_literal ("Float64" )).alias ("a_as_float" ),
916- f .arrow_cast (column ("a" ), utf8_literal ("Int32" )).alias ("a_as_int" ),
910+ f .arrow_cast (column ("a" ), literal ("Float64" )).alias ("a_as_float" ),
911+ f .arrow_cast (column ("a" ), literal ("Int32" )).alias ("a_as_int" ),
917912 )
918913 result = df .collect ()
919914 assert len (result ) == 1
You can’t perform that action at this time.
0 commit comments