dongjoon-hyun commented on a change in pull request #23756: [SPARK-26853][SQL]
Add example and version for commonly used aggregate function descriptions
URL: https://github.com/apache/spark/pull/23756#discussion_r255318968
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/aggregate/Count.scala
##########
@@ -29,7 +29,17 @@ import org.apache.spark.sql.types._
_FUNC_(expr[, expr...]) - Returns the number of rows for which the
supplied expression(s) are all non-null.
_FUNC_(DISTINCT expr[, expr...]) - Returns the number of rows for which
the supplied expression(s) are unique and non-null.
- """)
+ """,
+ examples = """
+ Examples:
+ > SELECT _FUNC_(*) FROM VALUES (NULL), (5), (5), (20) AS tab(col);
+ 4
+ > SELECT _FUNC_(col) FROM VALUES (NULL), (5), (5), (20) AS tab(col);
+ 3
+ > SELECT _FUNC_(DISTINCT col) FROM VALUES (NULL), (5), (5), (10) AS
tab(col);
+ 2
+ """,
+ since = "1.3.0")
Review comment:
ditto.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]