You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by gatorsmile <gi...@git.apache.org> on 2018/10/08 18:37:27 UTC

[GitHub] spark pull request #21102: [SPARK-23913][SQL] Add array_intersect function

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

    https://github.com/apache/spark/pull/21102#discussion_r223460909
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/collectionOperations.scala ---
    @@ -3965,6 +4034,248 @@ object ArrayUnion {
       }
     }
     
    +/**
    + * Returns an array of the elements in the intersect of x and y, without duplicates
    + */
    +@ExpressionDescription(
    +  usage = """
    +  _FUNC_(array1, array2) - Returns an array of the elements in the intersection of array1 and
    +    array2, without duplicates.
    --- End diff --
    
    It sounds like our null handling is incorrect. NULL does not equal to NULL. 
    ```
    SELECT array_intersect(ARRAY(NULL), ARRAY(NULL));
    ```
    
    This should return an empty set. 


---

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