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

Takeshi Yamamuro commented on SPARK-21629:
------------------------------------------

What's a concrete query and result example?
It is like a sequence below?
{code}
scala> Seq((Some(1), 1), (None, 2)).toDF("a", "b").selectExpr("a > 0 OR b > 
0").printSchema
root
 |-- ((a > 0) OR (b > 0)): boolean (nullable = true)


scala> Seq((1, 1), (0, 2)).toDF("a", "b").selectExpr("a > 0 OR b > 
0").printSchema
root
 |-- ((a > 0) OR (b > 0)): boolean (nullable = false)
{code}

> OR nullability is incorrect
> ---------------------------
>
>                 Key: SPARK-21629
>                 URL: https://issues.apache.org/jira/browse/SPARK-21629
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 2.0.0, 2.1.1, 2.2.0
>            Reporter: Herman van Hovell
>            Priority: Minor
>
> The SQL {{OR}} expression's nullability is slightly incorrect. It should only 
> be nullable when both of the input expressions are nullable, and not when 
> either of them is nullable.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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

Reply via email to