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

    https://github.com/apache/spark/pull/21069#discussion_r185726735
  
    --- Diff: 
sql/core/src/test/scala/org/apache/spark/sql/DataFrameFunctionsSuite.scala ---
    @@ -691,6 +691,30 @@ class DataFrameFunctionsSuite extends QueryTest with 
SharedSQLContext {
         }
       }
     
    +  test("array remove") {
    +    val df = Seq(
    +      (Array[Int](2, 1, 2, 3), Array("a", "b", "c", "a"), Array("", "")),
    +      (Array.empty[Int], Array.empty[String], Array.empty[String]),
    +      (null, null, null)
    +    ).toDF("a", "b", "c")
    +    checkAnswer(
    +      df.select(array_remove(df("a"), 2), array_remove(df("b"), "a"), 
array_remove(df("c"), "")),
    --- End diff --
    
    maybe `$"a"` form is preferred to `df("a")`.


---

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

Reply via email to