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 2020/11/12 06:52:55 UTC

[GitHub] [spark] c21 commented on a change in pull request #30347: [SPARK-33209][SS] Refactor unit test of stream-stream join in UnsupportedOperationsSuite

c21 commented on a change in pull request #30347:
URL: https://github.com/apache/spark/pull/30347#discussion_r521874667



##########
File path: sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/analysis/UnsupportedOperationsSuite.scala
##########
@@ -384,239 +384,166 @@ class UnsupportedOperationsSuite extends SparkFunSuite {
     outputMode = Append
   )
 
-  // Inner joins: Multiple stream-stream joins supported only in append mode
-  testBinaryOperationInStreamingPlan(
-    "single inner join in append mode",
-    _.join(_, joinType = Inner),
-    outputMode = Append,
-    streamStreamSupported = true)
-
-  testBinaryOperationInStreamingPlan(
-    "multiple inner joins in append mode",
-    (x: LogicalPlan, y: LogicalPlan) => {
-      x.join(y, joinType = Inner).join(streamRelation, joinType = Inner)
-    },
-    outputMode = Append,
-    streamStreamSupported = true)
-
-  testBinaryOperationInStreamingPlan(
-    "inner join in update mode",
-    _.join(_, joinType = Inner),
-    outputMode = Update,
-    streamStreamSupported = false,
-    expectedMsg = "is not supported in Update output mode")
-
-  // Full outer joins: only batch-batch is allowed
-  testBinaryOperationInStreamingPlan(
-    "full outer join",
-    _.join(_, joinType = FullOuter),
-    streamStreamSupported = false,
-    batchStreamSupported = false,
-    streamBatchSupported = false)
+  // stream-stream join
+  {
+    // Inner joins: Multiple stream-stream joins supported only in append mode
+    testBinaryOperationInStreamingPlan(
+      "single inner join in append mode",
+      _.join(_, joinType = Inner),
+      outputMode = Append)
+
+    testBinaryOperationInStreamingPlan(
+      "multiple inner joins in append mode",
+      (x: LogicalPlan, y: LogicalPlan) => {
+        x.join(y, joinType = Inner).join(streamRelation, joinType = Inner)
+      },
+      outputMode = Append)
+
+    testBinaryOperationInStreamingPlan(
+      "inner join in update mode",
+      _.join(_, joinType = Inner),
+      outputMode = Update,
+      streamStreamSupported = false,
+      expectedMsg = "is not supported in Update output mode")
+
+    // Full outer joins: only batch-batch is allowed
+    testBinaryOperationInStreamingPlan(
+      "full outer join",
+      _.join(_, joinType = FullOuter),
+      streamStreamSupported = false,
+      batchStreamSupported = false,
+      streamBatchSupported = false)

Review comment:
       Note: this 4 tests are original from https://github.com/apache/spark/blob/master/sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/analysis/UnsupportedOperationsSuite.scala#L387-L415




----------------------------------------------------------------
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.

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