Github user mgaido91 commented on a diff in the pull request:

    https://github.com/apache/spark/pull/22029#discussion_r228262819
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/predicates.scala
 ---
    @@ -202,7 +209,11 @@ case class InSubquery(values: Seq[Expression], query: 
ListQuery)
      */
     // scalastyle:off line.size.limit
     @ExpressionDescription(
    -  usage = "expr1 _FUNC_(expr2, expr3, ...) - Returns true if `expr` equals 
to any valN.",
    +  usage = """
    +    expr1 _FUNC_(expr2, expr3, ...) - Returns true if `expr` equals to any 
valN. Otherwise, if
    +      spark.sql.legacy.inOperator.falseForNullField is false and any of 
the elements or fields of
    +      the elements is null it returns null, else it returns false.
    --- End diff --
    
    I think the point here is that only a string literal works, so it doesn't 
work concat and/or interpolation. This just puts the string on different lines, 
ie. the output is:
    ```
    scala> sql("DESCRIBE FUNCTION IN").show(false)
    
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
    |function_desc                                                              
                                                                                
                                                                                
                               |
    
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
    |Function: in                                                               
                                                                                
                                                                                
                               |
    |Class: org.apache.spark.sql.catalyst.expressions.In                        
                                                                                
                                                                                
                               |
    |Usage: 
        expr1 in(expr2, expr3, ...) - Returns true if `expr` equals to any 
valN. Otherwise, if
          spark.sql.legacy.inOperator.falseForNullField is false and any of the 
elements or fields of
          the elements is null it returns null, else it returns false.
      |
    
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
    ```


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to