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/02/25 03:28:29 UTC

[GitHub] [spark] cloud-fan commented on a change in pull request #35652: [SPARK-38316][SQL][TESTS] Fix SQLViewSuite/TriggerAvailableNowSuite/Unwrap*Suite under ANSI mode

cloud-fan commented on a change in pull request #35652:
URL: https://github.com/apache/spark/pull/35652#discussion_r814448659



##########
File path: sql/core/src/test/scala/org/apache/spark/sql/UnwrapCastInComparisonEndToEndSuite.scala
##########
@@ -191,18 +191,27 @@ class UnwrapCastInComparisonEndToEndSuite extends QueryTest with SharedSparkSess
   }
 
   test("SPARK-36607: Support BooleanType in UnwrapCastInBinaryComparison") {
+    def verifyCastBoolean(df: DataFrame, query: String, answer: Seq[Row]): Unit =
+      if (conf.ansiEnabled) {
+        intercept[AnalysisException] {
+          df.where(query).collect()

Review comment:
       It looks meaningless to ansi error behavior in this optimizer rule test suite. Can we simply turn off ansi in this test case?

##########
File path: sql/core/src/test/scala/org/apache/spark/sql/UnwrapCastInComparisonEndToEndSuite.scala
##########
@@ -191,18 +191,27 @@ class UnwrapCastInComparisonEndToEndSuite extends QueryTest with SharedSparkSess
   }
 
   test("SPARK-36607: Support BooleanType in UnwrapCastInBinaryComparison") {
+    def verifyCastBoolean(df: DataFrame, query: String, answer: Seq[Row]): Unit =
+      if (conf.ansiEnabled) {
+        intercept[AnalysisException] {
+          df.where(query).collect()

Review comment:
       It looks meaningless to test ansi error behavior in this optimizer rule test suite. Can we simply turn off ansi in this test case?




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