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

    https://github.com/apache/spark/pull/7580#discussion_r35239110
  
    --- Diff: 
sql/core/src/test/scala/org/apache/spark/sql/DataFrameFunctionsSuite.scala ---
    @@ -298,4 +298,32 @@ class DataFrameFunctionsSuite extends QueryTest {
           Seq(Row(2), Row(0), Row(3))
         )
       }
    +
    +  test("array contains function") {
    +    val df = Seq(
    +      (Seq[Int](1, 2), "x"),
    +      (Seq[Int](), "y"),
    +      (null, "z")
    +    ).toDF("a", "b")
    +    checkAnswer(
    +      df.select(array_contains("a", 1)),
    +      Seq(Row(true), Row(false), Row(false))
    +    )
    +    checkAnswer(
    +      df.selectExpr("array_contains(a, 1)"),
    +      Seq(Row(true), Row(false), Row(false))
    +    )
    +    //checkAnswer(
    --- End diff --
    
    So given that I should use `eval` since we are overriding the default 
behavior of `null` arguments (which is being overridden to return `false`), and 
that as the tests are currently written they fail (with the above stack trace), 
how would it be best to test this?


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to