Skip to content

Commit 187e077

Browse files
committed
Add description for utf8_literal vs literal
1 parent cdf32cd commit 187e077

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

python/datafusion/expr.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,10 @@ def literal(value: Any) -> Expr:
382382

383383
@staticmethod
384384
def utf8_literal(value: str) -> Expr:
385-
"""Creates a new expression representing a UTF8 literal value."""
385+
"""Creates a new expression representing a UTF8 literal value.
386+
387+
It is different from `literal` because it is pa.string() instead of pa.string_view()
388+
"""
386389
if isinstance(value, str):
387390
value = pa.scalar(value, type=pa.string())
388391
return Expr(expr_internal.Expr.literal(value))

0 commit comments

Comments
 (0)