[ 
https://issues.apache.org/jira/browse/SPARK-16152?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15345424#comment-15345424
 ] 

kevin yu commented on SPARK-16152:
----------------------------------

Hello Ashar: I think it is working as design, it is added by this jira 
https://issues.apache.org/jira/browse/SPARK-10323

> `In` predicate does not work with null values
> ---------------------------------------------
>
>                 Key: SPARK-16152
>                 URL: https://issues.apache.org/jira/browse/SPARK-16152
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 1.6.1
>            Reporter: Ashar Fuadi
>
> According to 
> https://github.com/apache/spark/blob/v1.6.1/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/predicates.scala#L134..L136:
> {code}
>  override def eval(input: InternalRow): Any = {
>     val evaluatedValue = value.eval(input)
>     if (evaluatedValue == null) {
>       null
>     } else {
>       ...
> {code}
> we always return {{null}} when the current value is null, ignoring the 
> elements of {{list}}. Therefore, we cannot have a predicate which tests 
> whether a column contains values in e.g. {{[1, 2, 3, null]}}
> Is this a bug, or is this actually the expected behavior?



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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

Reply via email to