Github user viirya commented on a diff in the pull request:
https://github.com/apache/spark/pull/11809#discussion_r56963992
--- Diff:
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/plans/ConstraintPropagationSuite.scala
---
@@ -217,4 +218,12 @@ class ConstraintPropagationSuite extends SparkFunSuite
{
IsNotNull(resolveColumn(tr, "a")),
IsNotNull(resolveColumn(tr, "b")))))
}
+
+ test("infer constraints on cast") {
+ val tr = LocalRelation('a.int, 'b.long)
+ verifyConstraints(tr.where('a.attr === 'b.attr).analyze.constraints,
--- End diff --
I think adding `IsNotNull(Cast(Cast(resolveColumn(tr, "a"), LongType),
LongType))` is not a valid test case for this. Because as you did this, you
explicitly add this into constraints and we don't remove any expression from
constraints now. So it will show up in final constraints.
---
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]