Github user hvanhovell commented on a diff in the pull request:

    https://github.com/apache/spark/pull/15322#discussion_r81491431
  
    --- Diff: 
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/parser/ExpressionParserSuite.scala
 ---
    @@ -292,6 +292,10 @@ class ExpressionParserSuite extends PlanTest {
       test("case when") {
         assertEqual("case a when 1 then b when 2 then c else d end",
           CaseKeyWhen('a, Seq(1, 'b, 2, 'c, 'd)))
    +    assertEqual("case (a or b) when true then c when false then d else e 
end",
    +      CaseKeyWhen('a || 'b, Seq(true, 'c, false, 'd, 'e)))
    +    assertEqual("case 'a'='a' when true then 1 end",
    --- End diff --
    
    Yeah, I thought the same thing. The issue here is that `case 'a'` also 
matches the `typeConstructor` rule which was triggered before the `simpleCase` 
rule. So I also fixed this by moving the rules around a bit more.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to