c21 commented on a change in pull request #30347:
URL: https://github.com/apache/spark/pull/30347#discussion_r521876131
##########
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)
+
+ // Left outer, left semi, left anti join: *-stream not allowed
+ Seq((LeftOuter, "LeftOuter join"), (LeftSemi, "LeftSemi join"), (LeftAnti,
"Left anti join"))
+ .foreach { case (joinType, name) =>
+ testBinaryOperationInStreamingPlan(
+ name,
+ _.join(_, joinType = joinType),
+ batchStreamSupported = false,
+ streamStreamSupported = false,
+ expectedMsg = name)
+ }
- // Left outer joins: *-stream not allowed
- testBinaryOperationInStreamingPlan(
- "left outer join",
- _.join(_, joinType = LeftOuter),
- batchStreamSupported = false,
- streamStreamSupported = false,
- expectedMsg = "outer join")
+ // Right outer joins: stream-* not allowed
+ testBinaryOperationInStreamingPlan(
+ "right outer join",
+ _.join(_, joinType = RightOuter),
+ streamBatchSupported = false,
+ streamStreamSupported = false,
+ expectedMsg = "outer join")
+
+ // Left outer, right outer, left semi joins
+ Seq(LeftOuter, RightOuter, LeftSemi).foreach { joinType =>
+ // Update mode not allowed
Review comment:
Note:
* left outer join is from
https://github.com/apache/spark/blob/master/sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/analysis/UnsupportedOperationsSuite.scala#L425-L485
.
* right outer join is from
https://github.com/apache/spark/blob/master/sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/analysis/UnsupportedOperationsSuite.scala#L573-L619
.
* left semi join is from
https://github.com/apache/spark/blob/master/sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/analysis/UnsupportedOperationsSuite.scala#L495-L555
.
----------------------------------------------------------------
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:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]