Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added hook to set common typmod for case expression (#452)
Issue: \Return type of overall CASE expression when branch expression is of String Datatype, is evaluated to give typmod error message if the common type is CHAR/NCHAR. eg. If the Common type evaluated is CHAR/NCHAR SELECT CASE 1 WHEN 1 THEN NULL WHEN 2 THEN CAST('char' AS CHAR(10)) END GO Output: Msg 33557097, Level 16, State 1, Server BABELFISH, Line 1 The string size for the given CHAR/NCHAR data is not defined. Please use an explicit CAST or CONVERT to CHAR(n)/NCHAR(n). Expected output: CHAR NULL Changes made to fix the issues: Implementing a hook that calculates the resultant typmod for the CASE expression, and also set typmod for all the CASE branches when . Task: BABEL-5103, BABEL-4332 Signed-off-by: Yashneet Vinayak <[email protected]>
- Loading branch information