Skip to content

Conversation

nozaq
Copy link
Contributor

@nozaq nozaq commented Apr 28, 2023

Fixes #2237

This PR contains the following changes.

  • Parse ELSE clause value as a constant instead of a type name when a node is ast.A_Const.
  • Add a test case for testing CASE expression with TEXT values.
  • Fix an error message when fails to parse the type name.

@nozaq nozaq changed the title Fix case else fix: CASE-ELSE clause is not properly parsed when a value is constant Apr 28, 2023
@kyleconroy kyleconroy merged commit 5555393 into sqlc-dev:main Apr 28, 2023
@nozaq nozaq deleted the fix-case-else branch April 28, 2023 21:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Failed to parse CASE-ELSE clause with v1.18.0
2 participants