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 2022/11/10 09:18:57 UTC

[GitHub] [spark] HyukjinKwon commented on a diff in pull request #38166: [SPARK-40713][CONNECT] Improve SET operation support in the proto and the server

HyukjinKwon commented on code in PR #38166:
URL: https://github.com/apache/spark/pull/38166#discussion_r1018835131


##########
connector/connect/src/test/scala/org/apache/spark/sql/connect/planner/SparkConnectProtoSuite.scala:
##########
@@ -81,6 +81,31 @@ class SparkConnectProtoSuite extends PlanTest with SparkConnectPlanTest {
     }
   }
 
+  test("Test union, except, intersect") {
+    for (isAll <- Seq(true, false)) {
+      val connectPlan = {
+        import org.apache.spark.sql.connect.dsl.plans._
+        transform(connectTestRelation.except(connectTestRelation, isAll))
+      }
+      val sparkPlan = sparkTestRelation.except(sparkTestRelation, isAll)
+      comparePlans(connectPlan.analyze, sparkPlan.analyze, false)
+
+      val connectPlan2 = {
+        import org.apache.spark.sql.connect.dsl.plans._
+        transform(connectTestRelation.intersect(connectTestRelation, isAll))
+      }
+      val sparkPlan2 = sparkTestRelation.intersect(sparkTestRelation, isAll)
+      comparePlans(connectPlan2.analyze, sparkPlan2.analyze, false)
+    }
+
+    val connectPlan3 = {
+      import org.apache.spark.sql.connect.dsl.plans._
+      transform(connectTestRelation.union(connectTestRelation))

Review Comment:
   Hm, sorry for joining this conversation late. Why don't we just match it to SQL plan implementation? If the design is the issue, we can refactor them together?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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