Skip to content

Commit 2411f3e

Browse files
committed
review comments
1 parent d986ddc commit 2411f3e

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

sql/core/src/test/scala/org/apache/spark/sql/SubquerySuite.scala

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -815,28 +815,28 @@ class SubquerySuite extends QueryTest with SharedSQLContext {
815815

816816
// Generate operator
817817
test("Correlated subqueries in LATERAL VIEW") {
818-
withTempView("t1", "t2", "t3") {
818+
withTempView("t1", "t2") {
819819
Seq((1, 1), (2, 0)).toDF("c1", "c2").createOrReplaceTempView("t1")
820820
Seq[(Int, Array[Int])]((1, Array(1, 2)), (2, Array(-1, -3)))
821821
.toDF("c1", "arr_c2").createTempView("t2")
822822
checkAnswer(
823823
sql(
824824
"""
825-
| select c2
826-
| from t1
827-
| where exists (select *
828-
| from t2 lateral view explode(arr_c2) q as c2
829-
where t1.c1 = t2.c1)""".stripMargin),
825+
| SELECT c2
826+
| FROM t1
827+
| WHERE EXISTS (SELECT *
828+
| FROM t2 LATERAL VIEW explode(arr_c2) q AS c2
829+
WHERE t1.c1 = t2.c1)""".stripMargin),
830830
Row(1) :: Row(0) :: Nil)
831831

832832
val msg1 = intercept[AnalysisException] {
833833
sql(
834834
"""
835-
| select c1
836-
| from t2
837-
| where exists (select *
838-
| from t1 lateral view explode(t2.arr_c2) q as c2
839-
| where t1.c1 = t2.c1)
835+
| SELECT c1
836+
| FROM t2
837+
| WHERE EXISTS (SELECT *
838+
| FROM t1 LATERAL VIEW explode(t2.arr_c2) q AS c2
839+
| WHERE t1.c1 = t2.c1)
840840
""".stripMargin)
841841
}
842842
assert(msg1.getMessage.contains(

0 commit comments

Comments
 (0)