Github user viirya commented on a diff in the pull request:
https://github.com/apache/spark/pull/19050#discussion_r137159871
--- Diff: sql/core/src/test/scala/org/apache/spark/sql/SubquerySuite.scala
---
@@ -875,4 +876,71 @@ class SubquerySuite extends QueryTest with
SharedSQLContext {
assert(e.message.contains("cannot resolve '`a`' given input columns:
[t.i, t.j]"))
}
}
+
+ test("SPARK-21835: Join in correlated subquery should be
duplicateResolved: case 1") {
+ withTable("t1") {
+ withTempPath { path =>
+ Seq(1 -> "a").toDF("i", "j").write.parquet(path.getCanonicalPath)
+ sql(s"CREATE TABLE t1 USING parquet LOCATION '${path.toURI}'")
+
+ val sqlText =
+ """
+ |SELECT * FROM t1
+ |WHERE
+ |NOT EXISTS (SELECT * FROM t1)
+ """.stripMargin
+ val ds = sql(sqlText)
--- End diff --
Yes, missing this. I'll remove it.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]