You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Ashar Fuadi (JIRA)" <ji...@apache.org> on 2016/06/22 18:52:31 UTC

[jira] [Created] (SPARK-16152) `In` predicate does not work with null values

Ashar Fuadi created SPARK-16152:
-----------------------------------

             Summary: `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-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org