Skip to content

Commit

Permalink
docs: add clarification comments for utf8_literal usage in arrow_cast…
Browse files Browse the repository at this point in the history
… tests
  • Loading branch information
kosiew committed Dec 3, 2024
1 parent 0106cb7 commit 74cbd3b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions python/tests/test_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -911,6 +911,9 @@ def test_temporal_functions(df):

def test_arrow_cast(df):
df = df.select(
# we use `utf8_literal` to returns utf8 instead of `literal` which returns utf8view

Check failure on line 914 in python/tests/test_functions.py

View workflow job for this annotation

GitHub Actions / build

Ruff (W505)

python/tests/test_functions.py:914:89: W505 Doc line too long (91 > 88)
# because datafusion.arrow_cast # expects a utf8 instead of utf8view
# https://github.com/apache/datafusion/blob/86740bfd3d9831d6b7c1d0e1bf4a21d91598a0ac/datafusion/functions/src/core/arrow_cast.rs#L179
f.arrow_cast(column("b"), utf8_literal("Float64")).alias("b_as_float"),
f.arrow_cast(column("b"), utf8_literal("Int32")).alias("b_as_int"),
)
Expand Down

0 comments on commit 74cbd3b

Please sign in to comment.