This is an automated email from the ASF dual-hosted git repository.

timsaucer pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/datafusion-python.git


The following commit(s) were added to refs/heads/main by this push:
     new 23f9179a docs: document null-handling function arguments (#1527)
23f9179a is described below

commit 23f9179ad08189637f88218a8ea77a1222262abc
Author: BharatDeva <[email protected]>
AuthorDate: Thu May 28 08:34:43 2026 -0500

    docs: document null-handling function arguments (#1527)
    
    Co-authored-by: BharatDeva <[email protected]>
---
 python/datafusion/functions.py | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/python/datafusion/functions.py b/python/datafusion/functions.py
index 28c10e00..38385300 100644
--- a/python/datafusion/functions.py
+++ b/python/datafusion/functions.py
@@ -910,6 +910,9 @@ def chr(arg: Expr) -> Expr:
 def coalesce(*args: Expr) -> Expr:
     """Returns the value of the first expr in ``args`` which is not NULL.
 
+    Args:
+        *args: Expressions to evaluate in order.
+
     Examples:
         >>> ctx = dfn.SessionContext()
         >>> df = ctx.from_pydict({"a": [None, 1], "b": [2, 3]})
@@ -1091,6 +1094,10 @@ def greatest(*args: Expr) -> Expr:
 def ifnull(x: Expr, y: Expr) -> Expr:
     """Returns ``x`` if ``x`` is not NULL. Otherwise returns ``y``.
 
+    Args:
+        x: Expression to return when it is not NULL.
+        y: Fallback expression to return when ``x`` is NULL.
+
     See Also:
         This is an alias for :py:func:`nvl`.
     """
@@ -1325,6 +1332,10 @@ def md5(arg: Expr) -> Expr:
 def nanvl(x: Expr, y: Expr) -> Expr:
     """Returns ``x`` if ``x`` is not ``NaN``. Otherwise returns ``y``.
 
+    Args:
+        x: Expression to return when it is not NaN.
+        y: Fallback expression to return when ``x`` is NaN.
+
     Examples:
         >>> ctx = dfn.SessionContext()
         >>> df = ctx.from_pydict({"a": [np.nan, 1.0], "b": [0.0, 0.0]})
@@ -1341,6 +1352,10 @@ def nanvl(x: Expr, y: Expr) -> Expr:
 def nvl(x: Expr, y: Expr) -> Expr:
     """Returns ``x`` if ``x`` is not ``NULL``. Otherwise returns ``y``.
 
+    Args:
+        x: Expression to return when it is not NULL.
+        y: Fallback expression to return when ``x`` is NULL.
+
     Examples:
         >>> ctx = dfn.SessionContext()
         >>> df = ctx.from_pydict({"a": [None, 1], "b": [0, 0]})
@@ -1358,6 +1373,11 @@ def nvl(x: Expr, y: Expr) -> Expr:
 def nvl2(x: Expr, y: Expr, z: Expr) -> Expr:
     """Returns ``y`` if ``x`` is not NULL. Otherwise returns ``z``.
 
+    Args:
+        x: Expression to check for NULL.
+        y: Expression to return when ``x`` is not NULL.
+        z: Expression to return when ``x`` is NULL.
+
     Examples:
         >>> ctx = dfn.SessionContext()
         >>> df = ctx.from_pydict({"a": [None, 1], "b": [10, 20], "c": [30, 
40]})


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to