We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8bdce97 commit 28a3e65Copy full SHA for 28a3e65
1 file changed
python/datafusion/expr.py
@@ -222,15 +222,15 @@
222
]
223
224
225
-def ensure_expr(value: Expr) -> expr_internal.Expr:
+def ensure_expr(value: Expr | Any) -> expr_internal.Expr:
226
"""Return the internal expression from ``Expr`` or raise ``TypeError``.
227
228
- This helper rejects plain strings so higher level APIs consistently
229
- require explicit :func:`~datafusion.col` or :func:`~datafusion.lit`
230
- expressions.
+ This helper rejects plain strings and other non-:class:`Expr` values so
+ higher level APIs consistently require explicit :func:`~datafusion.col` or
+ :func:`~datafusion.lit` expressions.
231
232
Args:
233
- value: Candidate expression.
+ value: Candidate expression or other object.
234
235
Returns:
236
The internal expression representation.
0 commit comments