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: [email protected]
For additional commands, e-mail: [email protected]