Skip to content

Commit 2d5615c

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 b8daf93 commit 2d5615c

1 file changed

Lines changed: 2 additions & 12 deletions

File tree

python/datafusion/functions.py

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

0 commit comments

Comments
 (0)