You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2018/12/11 03:40:23 UTC

[GitHub] cloud-fan commented on a change in pull request #23057: [SPARK-26078][SQL] Dedup self-join attributes on IN subqueries

cloud-fan commented on a change in pull request #23057: [SPARK-26078][SQL] Dedup self-join attributes on IN subqueries
URL: https://github.com/apache/spark/pull/23057#discussion_r240464363
 
 

 ##########
 File path: sql/core/src/test/scala/org/apache/spark/sql/SubquerySuite.scala
 ##########
 @@ -1280,4 +1281,46 @@ class SubquerySuite extends QueryTest with SharedSQLContext {
       assert(subqueries.length == 1)
     }
   }
+
+  test("SPARK-26078: deduplicate fake self joins for IN subqueries") {
+    withTempView("a", "b") {
+      def genTestViewWithName(name: String): Unit = {
+        val df = spark.createDataFrame(
+          spark.sparkContext.parallelize(Seq(Row("a", 2), Row("b", 1))),
+          StructType(Seq(StructField("id", StringType), StructField("num", IntegerType))))
+        df.createOrReplaceTempView(name)
+      }
+      genTestViewWithName("a")
 
 Review comment:
   nit:
   ```
   Seq("a" -> 2, "b" -> 1).toDF("id", "num").createTempView("a")
   Seq("a" -> 2, "b" -> 1).toDF("id", "num").createTempView("b")
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org