Github user nsyca commented on a diff in the pull request:
https://github.com/apache/spark/pull/16467#discussion_r94519176
--- Diff: sql/core/src/test/scala/org/apache/spark/sql/SubquerySuite.scala
---
@@ -263,12 +263,12 @@ class SubquerySuite extends QueryTest with
SharedSQLContext {
Row(1, 2.0) :: Row(1, 2.0) :: Nil)
checkAnswer(
- sql("select * from l where a not in (select c from t where b < d)"),
- Row(1, 2.0) :: Row(1, 2.0) :: Row(3, 3.0) :: Nil)
+ sql("select * from l where (a, b) not in (select c, d from t) and a
< 4"),
+ Row(1, 2.0) :: Row(1, 2.0) :: Row(2, 1.0) :: Row(2, 1.0) :: Row(3,
3.0) :: Nil)
--- End diff --
Query with correlated predicates in NOT IN subquery could generate
incorrect results (this problem is tracked by SPARK-18966). With this fix, it
reveals the problem. Here I modify the test case to cover the code path for
multiple columns instead.
---
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]