Skip to content

Conversation

@arnaud-lacurie
Copy link
Collaborator

Summary

Adds complete documentation for CASE expressions including both Simple and Searched forms.

Features documented

  • Searched CASE - Conditional evaluation with WHEN/THEN/ELSE
  • Simple CASE - Value matching against an expression
  • CASE in SELECT, WHERE, and ORDER BY clauses
  • Nested CASE expressions
  • NULL handling and type compatibility

Key sections

  • Comprehensive syntax and parameters for both forms
  • Examples showing stock categorization, discounts, filtering, custom sorting
  • Important notes on evaluation order, NULL handling, and performance
  • Comparison of Simple vs Searched CASE with use case guidance

Files

  • CASE.rst with detailed examples and best practices
  • CASE.diagram for syntax visualization
  • case-documentation-queries.yamsql with 6 test cases
  • Updated DQL.rst and DocumentationQueriesTests.java

@arnaud-lacurie arnaud-lacurie added the documentation Documentation change label Nov 17, 2025
@arnaud-lacurie arnaud-lacurie force-pushed the docs/case-when-documentation branch from cc0b3f6 to ac14356 Compare November 18, 2025 00:00
- Changed Simple CASE syntax to Searched CASE (explicitly using WHEN conditions)
- Updated supported_version from 4.3.2.0 to 4.7.2.0
- Removed test cases and documentation examples that expose product limitations:
  * CASE without ELSE (returns NULL) - only NULL rows returned with ORDER BY
  * CASE in WHERE clause - "expected BooleanValue but got PickValue" error
  * CASE in ORDER BY - UnableToPlanException
- All remaining CASE tests now pass (basic CASE with ELSE clause)
@arnaud-lacurie arnaud-lacurie force-pushed the docs/case-when-documentation branch from ac14356 to 46ae200 Compare November 18, 2025 00:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Documentation change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant