Github user cloud-fan commented on a diff in the pull request:
https://github.com/apache/spark/pull/16067#discussion_r90177275
--- Diff: sql/core/src/test/scala/org/apache/spark/sql/DataFrameSuite.scala
---
@@ -1697,6 +1697,12 @@ class DataFrameSuite extends QueryTest with
SharedSQLContext {
expr = "cast((_1 + _2) as boolean)", expectedNonNullableColumns =
Seq("_1", "_2"))
}
+ test("SPARK-17897: Fixed IsNotNull Constraint Inference Rule") {
+ val data = Seq[java.lang.Integer](1, null).toDF("key")
+ checkAnswer(data.filter("not key is not null"), Row(null))
--- End diff --
shall we use DataFrame API? i.e. `data.filter(!$"key".isNotNull)`. The
string version looks weird...
---
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]