maropu commented on a change in pull request #29056:
URL: https://github.com/apache/spark/pull/29056#discussion_r455450809
##########
File path: docs/sql-ref-syntax-qry-select-groupby.md
##########
@@ -260,6 +274,30 @@ SELECT city, car_model, sum(quantity) AS sum FROM dealer
| San Jose| HondaAccord| 8|
| San Jose| HondaCivic| 5|
+---------+------------+---+
+
+--Prepare data for ignore nulls example
+CREATE TABLE person (id INT, name STRING, age INT);
+INSERT INTO person VALUES
+ (100, 'Mary', NULL),
+ (200, 'John', 30),
+ (300, 'Mike', 80),
+ (400, 'Dan', 50);
+
+--Select the first row in cloumn age
+SELECT FIRST(age) FROM person;
++--------------------+
+| first(age, false) |
++--------------------+
+| NULL |
++--------------------+
+
+--Get the first row in cloumn `age` ignore nulls,last row in column `id` and
sum of cloumn `id`.
+SELECT FIRST(age IGNORE NULLS), LAST(id), SUM(id) FROM person;
++-------------------+------------------+----------+--+
Review comment:
remove `--+` in the end.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]