zhengruifeng commented on code in PR #38956:
URL: https://github.com/apache/spark/pull/38956#discussion_r1047967339


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/conditionalExpressions.scala:
##########
@@ -386,10 +386,9 @@ object CaseWhen {
    *                 position are branch values.
    */
   def createFromParser(branches: Seq[Expression]): CaseWhen = {
-    val cases = branches.grouped(2).flatMap {
-      case cond :: value :: Nil => Some((cond, value))
-      case value :: Nil => None
-    }.toArray.toSeq  // force materialization to make the seq serializable
+    val cases = branches.grouped(2).flatMap { g =>

Review Comment:
   `createFromParser` was never used
   
   make this change, since it causes `MatchError`



-- 
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: [email protected]

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