You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "ntjohnson1 (via GitHub)" <gi...@apache.org> on 2026/03/11 16:31:55 UTC

[PR] Add docstring examples for Scalar array/list functions [datafusion-python]

ntjohnson1 opened a new pull request, #1420:
URL: https://github.com/apache/datafusion-python/pull/1420

   # Which issue does this PR close?
   * Part 7 of https://github.com/apache/datafusion-python/pull/1400
   * Related to https://github.com/apache/datafusion-python/issues/1394
   
    # Rationale for this change
   Add example usage to docstrings for Scalar array/list functions to improve documentation.
   
   # What changes are included in this PR?
   The first PR was basically adding a docstring to everything in functions. I broke it apart into a PR (that already merged) for the infra. I then reviewed and merged an example PR of adding the docstrings in parts. This is now the follow up opening a handful of PRs for the remaining functions in functions.py Everything is co-authored with Claude since I used claude to extend the handwritten examples I wrote for reference and to split apart the large PR rather than doing it manually.
   
   I've reviewed all the code prior to PR.
   
   # Are there any user-facing changes?
   No


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] Add docstring examples for Scalar array/list functions [datafusion-python]

Posted by "kosiew (via GitHub)" <gi...@apache.org>.
kosiew commented on PR #1420:
URL: https://github.com/apache/datafusion-python/pull/1420#issuecomment-4072658167

   hi @ntjohnson1 
   
   I have merged a few of your PRs. Can you retry?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] Add docstring examples for Scalar array/list functions [datafusion-python]

Posted by "kosiew (via GitHub)" <gi...@apache.org>.
kosiew commented on code in PR #1420:
URL: https://github.com/apache/datafusion-python/pull/1420#discussion_r2929709858


##########
python/datafusion/functions.py:
##########
@@ -1352,6 +1362,14 @@ def make_list(*args: Expr) -> Expr:
     """Returns an array using the specified input expressions.
 
     This is an alias for :py:func:`make_array`.

Review Comment:
   The alias functions now duplicate a lot of near-identical doctest text. For cases like `make_list`/`array` and the various `list_*` or `array_*` aliases, consider keeping the runnable example on the canonical function and letting alias docstrings point back to it. That would keep this module smaller and make future example edits less repetitive.



##########
python/datafusion/functions.py:
##########
@@ -2013,6 +2689,14 @@ def array_agg(
     For example::
 
         df.aggregate([], array_agg(col("a"), order_by="b"))

Review Comment:
   `array_agg` is an aggregate function rather than a scalar array/list helper, so its new example feels a little outside the stated scope of this PR.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] Add docstring examples for Scalar array/list functions [datafusion-python]

Posted by "ntjohnson1 (via GitHub)" <gi...@apache.org>.
ntjohnson1 commented on PR #1420:
URL: https://github.com/apache/datafusion-python/pull/1420#issuecomment-4067131720

   Note the CI failure look like an unrelated hiccup. I can't re-run things directly. But as the other PRs merge I can pull in main to re-verify this PR.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org