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 2021/09/01 09:28:51 UTC

[GitHub] [spark] kazuyukitanimura commented on a change in pull request #33865: [SPARK-36607][SQL] Support BooleanType in UnwrapCastInBinaryComparison

kazuyukitanimura commented on a change in pull request #33865:
URL: https://github.com/apache/spark/pull/33865#discussion_r699742430



##########
File path: sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/analysis/TypeCoercionSuite.scala
##########
@@ -1244,48 +1244,6 @@ class TypeCoercionSuite extends AnalysisTest {
     )
   }
 
-  test("BooleanEquality simplification") {
-    val be = TypeCoercion.BooleanEquality
-
-    ruleTest(be,
-      EqualTo(Literal(true), Literal(1)),
-      Literal(true)
-    )

Review comment:
       Thanks, you are right that there is no case covered for comparing `Literal(true)` and `Literal(1)` combination. Now I feel I should separate out the work of removing the extra logic of `TypeCoercion` as a different PR with more tests. I will put them back for this PR

##########
File path: sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/analysis/TypeCoercionSuite.scala
##########
@@ -1244,48 +1244,6 @@ class TypeCoercionSuite extends AnalysisTest {
     )
   }
 
-  test("BooleanEquality simplification") {
-    val be = TypeCoercion.BooleanEquality
-
-    ruleTest(be,
-      EqualTo(Literal(true), Literal(1)),
-      Literal(true)
-    )

Review comment:
       Thanks, you are right that there is no case covered for comparing `Literal(true)` and `Literal(1)` combination. UnwrapCastInBinaryComparisonSuite only covers that one side is `Literal`. Now I feel I should separate out the work of removing the extra logic of `TypeCoercion` as a different PR with more tests. I will put them back for this PR




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