Skip to content

Commit c773349

Browse files
timsaucerclaude
andcommitted
Use standard alias docstring pattern for ifnull
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 0d14831 commit c773349

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

python/datafusion/functions.py

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1053,18 +1053,8 @@ def greatest(*args: Expr) -> Expr:
10531053
def ifnull(x: Expr, y: Expr) -> Expr:
10541054
"""Returns ``x`` if ``x`` is not NULL. Otherwise returns ``y``.
10551055
1056-
This is an alias for :py:func:`nvl`.
1057-
1058-
Examples:
1059-
>>> ctx = dfn.SessionContext()
1060-
>>> df = ctx.from_pydict({"a": [None, 1], "b": [0, 0]})
1061-
>>> result = df.select(
1062-
... dfn.functions.ifnull(dfn.col("a"), dfn.col("b")).alias("ifnull")
1063-
... )
1064-
>>> result.collect_column("ifnull")[0].as_py()
1065-
0
1066-
>>> result.collect_column("ifnull")[1].as_py()
1067-
1
1056+
See Also:
1057+
This is an alias for :py:func:`nvl`.
10681058
"""
10691059
return nvl(x, y)
10701060

0 commit comments

Comments
 (0)