Skip to content

Commit f9814dd

Browse files
committed
docs: update examples to use utf8_literal in arrow_cast function
1 parent 4aa6c7e commit f9814dd

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/source/user-guide/common-operations/functions.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ DataFusion offers mathematical functions such as :py:func:`~datafusion.functions
3838

3939
.. ipython:: python
4040
41-
from datafusion import col, literal
41+
from datafusion import col, literal, utf8_literal
4242
from datafusion import functions as f
4343
4444
df.select(
@@ -112,8 +112,8 @@ Casting expressions to different data types using :py:func:`~datafusion.function
112112
.. ipython:: python
113113
114114
df.select(
115-
f.arrow_cast(col('"Total"'), "Float64").alias("total_as_float"),
116-
f.arrow_cast(col('"Total"'), "Int32").alias("total_as_int")
115+
f.arrow_cast(col('"Total"'), utf8_literal("Float64")).alias("total_as_float"),
116+
f.arrow_cast(col('"Total"'), utf8_literal("Int32")).alias("total_as_int")
117117
)
118118
119119
Other

0 commit comments

Comments
 (0)