Skip to content

Make ELSE optional in CASE expressions - #4150

Closed
sieun0322 wants to merge 1 commit into
spring-projects:mainfrom
sieun0322:gh-4142-optional-case-else
Closed

Make ELSE optional in CASE expressions#4150
sieun0322 wants to merge 1 commit into
spring-projects:mainfrom
sieun0322:gh-4142-optional-case-else

Conversation

@sieun0322

Copy link
Copy Markdown
Contributor

Resolves #4142

Summary

Makes the ELSE clause optional in CASE expressions

Changes

  • Updated the ANTLR grammar files for both JPQL and EQL parsers to make the ELSE clause optional by wrapping (ELSE scalar_expression) with ? quantifier.
  • Added test cases for optional ELSE scenarios

Checklist

  • You have read the Spring Data contribution guidelines.
  • You use the code formatters provided here and have them applied to your changes. Don’t submit any formatting related changes.
  • You submit test cases (unit or integration tests) that back your changes.
  • You added yourself as author in the headers of the classes you touched. Amend the date range in the Apache license header if needed. For new types, add the license header (copy from another file and set the current year only).

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Jan 9, 2026
Signed-off-by: sieun0322 <lce322@naver.com>
@sieun0322
sieun0322 force-pushed the gh-4142-optional-case-else branch from 45731fc to b032a6a Compare January 9, 2026 11:51
@sieun0322 sieun0322 closed this Jan 9, 2026
@sieun0322 sieun0322 reopened this Jan 9, 2026
@mp911de mp911de added type: enhancement A general enhancement and removed status: waiting-for-triage An issue we've not yet triaged labels Jan 12, 2026
@mp911de mp911de added this to the 4.0.2 (2025.1.2) milestone Jan 12, 2026
@mp911de

mp911de commented Jan 12, 2026

Copy link
Copy Markdown
Member

Thank you for your contribution. That's merged, polished, and backported now.

For future contributions, please avoid excessive summarization that is typical for AI tools, a short and concise description (such as Updated the JPQL and EQL ANTLR grammar to make the ELSE clause optional) is fully sufficient.

mp911de pushed a commit that referenced this pull request Jan 12, 2026
Signed-off-by: sieun0322 <lce322@naver.com>
Closes: #4142
Original pull request: #4150
mp911de added a commit that referenced this pull request Jan 12, 2026
Consolidate QueryRender tests to JpqlQueryRendererTckTests.

Original pull request: #4150
See #4142
mp911de pushed a commit that referenced this pull request Jan 12, 2026
Signed-off-by: sieun0322 <lce322@naver.com>
Closes: #4142
Original pull request: #4150
mp911de added a commit that referenced this pull request Jan 12, 2026
Consolidate QueryRender tests to JpqlQueryRendererTckTests.

Original pull request: #4150
See #4142
@mp911de mp911de closed this Jan 12, 2026
@mp911de mp911de self-assigned this Jan 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: enhancement A general enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make ELSE optional in CASE expressions

3 participants