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

    https://github.com/apache/spark/pull/2561#discussion_r18439369
  
    --- Diff: 
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/ExpressionEvaluationSuite.scala
 ---
    @@ -136,6 +138,18 @@ class ExpressionEvaluationSuite extends FunSuite {
         checkEvaluation(In(Literal(1), Seq(Literal(1), Literal(2))) && 
In(Literal(2), Seq(Literal(1), Literal(2))), true)
       }
     
    +  test("INSET") {
    +    val hS = HashSet[Any]() + 1 + 2
    +    val s = Seq(Literal(1), Literal(2))
    +    val one = Literal(1)
    +    val two = Literal(2)
    +    val three = Literal(3)
    +    checkEvaluation(InSet(one, hS, one +: s), true)
    +    checkEvaluation(InSet(two, hS, two +: s), true)
    +    checkEvaluation(InSet(three, hS, three +: s), false)
    +    checkEvaluation(InSet(one, hS, one +: s) && InSet(two, hS, two +: s), 
true)
    --- End diff --
    
    We should also double check that there isn't a problem if a `null` is in 
the in list.  I'm not sure if thats actually valid SQL (and it should never 
change the result), but we shouldn't throw an exception.


---
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