Skip to content

Commit 399980e

Browse files
HyukjinKwonzhengruifeng
authored andcommitted
[MINOR][DOCS] Fix the type hints of functions.first(..., ignorenulls) and functions.last(..., ignorenulls)
### What changes were proposed in this pull request? This PR proposes to fix the type hints of `functions.first(..., ignorenulls)` and `functions.last(..., ignorenulls)` to be properly `bool`s. ### Why are the changes needed? To guide users about the correct types ### Does this PR introduce _any_ user-facing change? Yes, it changes the user-facing documentation. ### How was this patch tested? CI in this PR should verify them. ### Was this patch authored or co-authored using generative AI tooling? No. Closes #47151 from HyukjinKwon/minor-doc-fix. Authored-by: Hyukjin Kwon <gurwls223@apache.org> Signed-off-by: Ruifeng Zheng <ruifengz@apache.org>
1 parent f70ce13 commit 399980e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

python/pyspark/sql/functions/builtin.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5474,8 +5474,8 @@ def first(col: "ColumnOrName", ignorenulls: bool = False) -> Column:
54745474
----------
54755475
col : :class:`~pyspark.sql.Column` or str
54765476
column to fetch first value for.
5477-
ignorenulls : :class:`~pyspark.sql.Column` or str
5478-
if first value is null then look for first non-null value.
5477+
ignorenulls : bool
5478+
if first value is null then look for first non-null value. ``False``` by default.
54795479

54805480
Returns
54815481
-------
@@ -5747,8 +5747,8 @@ def last(col: "ColumnOrName", ignorenulls: bool = False) -> Column:
57475747
----------
57485748
col : :class:`~pyspark.sql.Column` or str
57495749
column to fetch last value for.
5750-
ignorenulls : :class:`~pyspark.sql.Column` or str
5751-
if last value is null then look for non-null value.
5750+
ignorenulls : bool
5751+
if last value is null then look for non-null value. ``False``` by default.
57525752

57535753
Returns
57545754
-------

0 commit comments

Comments
 (0)