Skip to content

Commit

Permalink
docs: update examples to use utf8_literal in arrow_cast function
Browse files Browse the repository at this point in the history
  • Loading branch information
kosiew committed Dec 3, 2024
1 parent 4aa6c7e commit f9814dd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/source/user-guide/common-operations/functions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ DataFusion offers mathematical functions such as :py:func:`~datafusion.functions

.. ipython:: python
from datafusion import col, literal
from datafusion import col, literal, utf8_literal
from datafusion import functions as f
df.select(
Expand Down Expand Up @@ -112,8 +112,8 @@ Casting expressions to different data types using :py:func:`~datafusion.function
.. ipython:: python
df.select(
f.arrow_cast(col('"Total"'), "Float64").alias("total_as_float"),
f.arrow_cast(col('"Total"'), "Int32").alias("total_as_int")
f.arrow_cast(col('"Total"'), utf8_literal("Float64")).alias("total_as_float"),
f.arrow_cast(col('"Total"'), utf8_literal("Int32")).alias("total_as_int")
)
Other
Expand Down

0 comments on commit f9814dd

Please sign in to comment.