You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by sr...@apache.org on 2021/11/07 13:49:48 UTC
[spark] branch master updated: [SPARK-37223][SQL][TESTS] Fix unit
test check in JoinHintSuite
This is an automated email from the ASF dual-hosted git repository.
srowen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/master by this push:
new ddf27bd [SPARK-37223][SQL][TESTS] Fix unit test check in JoinHintSuite
ddf27bd is described below
commit ddf27bd3af4cee733b8303c9cde386861e87c449
Author: Cheng Su <ch...@fb.com>
AuthorDate: Sun Nov 7 07:48:31 2021 -0600
[SPARK-37223][SQL][TESTS] Fix unit test check in JoinHintSuite
### What changes were proposed in this pull request?
This is to fix the unit test where we should assert on the content of log in `JoinHintSuite`.
### Why are the changes needed?
Improve test.
### Does this PR introduce _any_ user-facing change?
No.
### How was this patch tested?
Changed test itself.
Closes #34501 from c21/test-fix.
Authored-by: Cheng Su <ch...@fb.com>
Signed-off-by: Sean Owen <sr...@gmail.com>
---
.../test/scala/org/apache/spark/sql/JoinHintSuite.scala | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/sql/core/src/test/scala/org/apache/spark/sql/JoinHintSuite.scala b/sql/core/src/test/scala/org/apache/spark/sql/JoinHintSuite.scala
index 91cad85..99bad40 100644
--- a/sql/core/src/test/scala/org/apache/spark/sql/JoinHintSuite.scala
+++ b/sql/core/src/test/scala/org/apache/spark/sql/JoinHintSuite.scala
@@ -612,8 +612,9 @@ class JoinHintSuite extends PlanTest with SharedSparkSession with AdaptiveSparkP
val logs = hintAppender.loggingEvents.map(_.getRenderedMessage)
.filter(_.contains("is not supported in the query:"))
- assert(logs.size == 2)
- logs.forall(_.contains(s"build left for ${joinType.split("_").mkString(" ")} join."))
+ assert(logs.size === 2)
+ logs.foreach(log =>
+ assert(log.contains(s"build left for ${joinType.split("_").mkString(" ")} join.")))
}
Seq("left_outer", "left_semi", "left_anti").foreach { joinType =>
@@ -640,8 +641,9 @@ class JoinHintSuite extends PlanTest with SharedSparkSession with AdaptiveSparkP
}
val logs = hintAppender.loggingEvents.map(_.getRenderedMessage)
.filter(_.contains("is not supported in the query:"))
- assert(logs.size == 2)
- logs.forall(_.contains(s"build right for ${joinType.split("_").mkString(" ")} join."))
+ assert(logs.size === 2)
+ logs.foreach(log =>
+ assert(log.contains(s"build right for ${joinType.split("_").mkString(" ")} join.")))
}
Seq("right_outer").foreach { joinType =>
@@ -689,8 +691,8 @@ class JoinHintSuite extends PlanTest with SharedSparkSession with AdaptiveSparkP
}
val logs = hintAppender.loggingEvents.map(_.getRenderedMessage)
.filter(_.contains("is not supported in the query:"))
- assert(logs.size == 2)
- logs.forall(_.contains("no equi-join keys"))
+ assert(logs.size === 2)
+ logs.foreach(log => assert(log.contains("no equi-join keys")))
}
test("SPARK-36652: AQE dynamic join selection should not apply to non-equi join") {
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org