diff --git a/python/datafusion/functions.py b/python/datafusion/functions.py index 9552876f..a1b6b20a 100644 --- a/python/datafusion/functions.py +++ b/python/datafusion/functions.py @@ -924,7 +924,7 @@ def to_timestamp(arg: Expr, *formatters: Expr) -> Expr: return f.to_timestamp(arg.expr) formatters = [f.expr for f in formatters] - return Expr(f.to_timestamp(arg.expr.cast(pa.string()), *formatters)) + return Expr(f.to_timestamp(arg.expr, *formatters)) def to_timestamp_millis(arg: Expr, *formatters: Expr) -> Expr: diff --git a/python/datafusion/udf.py b/python/datafusion/udf.py index 291ef2ba..d9d994b2 100644 --- a/python/datafusion/udf.py +++ b/python/datafusion/udf.py @@ -229,6 +229,7 @@ def udaf( which this UDAF is used. The following examples are all valid. .. code-block:: python + import pyarrow as pa import pyarrow.compute as pc