Github user HyukjinKwon commented on a diff in the pull request: https://github.com/apache/spark/pull/15513#discussion_r85626037 --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/conditionalExpressions.scala --- @@ -162,7 +172,15 @@ abstract class CaseWhenBase( */ // scalastyle:off line.size.limit @ExpressionDescription( - usage = "CASE WHEN a THEN b [WHEN c THEN d]* [ELSE e] END - When a = true, returns b; when c = true, return d; else return e.") + usage = "CASE WHEN expr1 THEN expr2 [WHEN expr3 THEN expr4]* [ELSE expr5] END - When `expr1` = true, returns `expr2`; when `expr3` = true, return `expr4`; else return `expr5`.", + extended = """ + Arguments: + expr1 - a boolean expression. + expr2 - an expression of any type. + expr3 - a boolean expression. + expr4 - an expression of any type. + expr5 - an expression of any type. --- End diff -- ```sql spark-sql> SELECT CASE WHEN true THEN array(1) WHEN true THEN array(1) ELSE array(1) END; [1] spark-sql> SELECT CASE WHEN true THEN struct(1) WHEN true THEN struct(1) ELSE struct(1) END; {"col1":1} spark-sql> SELECT CASE WHEN true THEN map(1, 1) WHEN true THEN map(1, 1) ELSE map(1, 1) END; {1:1} ```
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org