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



##########
File path: 
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/optimizer/PushFoldableIntoBranchesSuite.scala
##########
@@ -258,4 +258,22 @@ class PushFoldableIntoBranchesSuite
       EqualTo(CaseWhen(Seq((a, Literal(1)), (c, Literal(2))), 
None).cast(StringType), Literal("4")),
       CaseWhen(Seq((a, FalseLiteral), (c, FalseLiteral)), None))
   }
+
+  test("SPARK-33847: Remove the CaseWhen if elseValue is empty and other 
outputs are null") {
+    assertEquivalent(

Review comment:
       nit: to make the test more readable
   ```
   Seq(a, LessThan(Rand(1), Literal(0.5)).foreach { condition =>
     assertEquivalent(EqualTo(CaseWhen(Seq((condition, ...
     assertEquivalent(// with cast ...
   }
   ```




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

Reply via email to