kosiew commented on code in PR #962:
URL: https://github.com/apache/datafusion-python/pull/962#discussion_r1881280309
##########
python/datafusion/functions.py:
##########
@@ -1108,6 +1109,11 @@ def arrow_typeof(arg: Expr) -> Expr:
return Expr(f.arrow_typeof(arg.expr))
+def arrow_cast(expr: Expr, data_type: Expr) -> Expr:
+ """Casts an expression to a specified data type."""
+ return Expr(f.arrow_cast(expr.expr, data_type.expr))
+
+
Review Comment:
From my understanding, arrow_cast can cast to certain arrow types that
Expr.cast cannot, eg Int8 as mentioned in
https://github.com/apache/datafusion/issues/5016
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]