Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Optimize CASE expressions on a constant
If operand is a constant 1. Remove the WhenClauses whose operand is constant and not equal to case operand 2. If we find a WhenClause, whose constant operand equals to CASE constant operand, remove all the WhenClauses on its right and the default value.
- Loading branch information
Showing
2 changed files
with
80 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters