We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3b83a96 commit cdf32cdCopy full SHA for cdf32cd
python/datafusion/expr.py
@@ -383,8 +383,10 @@ def literal(value: Any) -> Expr:
383
@staticmethod
384
def utf8_literal(value: str) -> Expr:
385
"""Creates a new expression representing a UTF8 literal value."""
386
- value = pa.scalar(value, type=pa.string())
387
- return Expr(expr_internal.Expr.literal(value))
+ if isinstance(value, str):
+ value = pa.scalar(value, type=pa.string())
388
+ return Expr(expr_internal.Expr.literal(value))
389
+ return literal(value)
390
391
392
def column(value: str) -> Expr:
0 commit comments