File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -384,8 +384,11 @@ def literal(value: Any) -> Expr:
384384 def utf8_literal (value : str ) -> Expr :
385385 """Creates a new expression representing a UTF8 literal value.
386386
387- It is different from `literal` because it is pa.string() instead of pa.string_view()
388- This is needed for cases where datafusion is expecting a utf8 instead of utf8view literal like in
387+ It is different from `literal` because it is pa.string() instead of
388+ pa.string_view()
389+
390+ This is needed for cases where DataFusion is expecting a UTF8 instead of
391+ UTF8View literal, like in:
389392 https://github.com/apache/datafusion/blob/86740bfd3d9831d6b7c1d0e1bf4a21d91598a0ac/datafusion/functions/src/core/arrow_cast.rs#L179
390393 """
391394 if isinstance (value , str ):
Original file line number Diff line number Diff line change @@ -911,8 +911,8 @@ def test_temporal_functions(df):
911911
912912def test_arrow_cast (df ):
913913 df = df .select (
914- # we use `utf8_literal` to returns utf8 instead of `literal` which returns utf8view
915- # because datafusion.arrow_cast # expects a utf8 instead of utf8view
914+ # we use `utf8_literal` to returns utf8 instead of `literal` which returns
915+ # utf8view # because datafusion.arrow_cast expects a utf8 instead of utf8view
916916 # https://github.com/apache/datafusion/blob/86740bfd3d9831d6b7c1d0e1bf4a21d91598a0ac/datafusion/functions/src/core/arrow_cast.rs#L179
917917 f .arrow_cast (column ("b" ), utf8_literal ("Float64" )).alias ("b_as_float" ),
918918 f .arrow_cast (column ("b" ), utf8_literal ("Int32" )).alias ("b_as_int" ),
You can’t perform that action at this time.
0 commit comments