You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CREATE OR REPLACEFUNCTIONget_grade(
percentage FLOAT64
)
RETURNS STRING
AS (
CASE
WHEN percentage >80 THEN 'A'
WHEN percentage >40 THEN 'B'
END
);
Expected Behaviour
ELSE option should be kept
CREATE OR REPLACEFUNCTIONget_grade(
percentage FLOAT64
)
RETURNS STRING
AS (
CASE
WHEN percentage >80 THEN 'A'
WHEN percentage >40 THEN 'B'
ELSE 'C'
END
);
How to reproduce
CREATE OR REPLACEFUNCTIONget_grade(
percentage FLOAT64
)
RETURNS STRING
AS (
CASE
WHEN percentage >80 THEN 'A'
WHEN percentage >40 THEN 'B'
ELSE 'C'
END
);
Configuration
[sqruff]dialect = bigquery
rules = all
At least in playground I could not even get a simple SELECT CASE to return anything:
select CASE
WHEN percentage >80 THEN 'A'
WHEN percentage >40 THEN 'B'
ELSE 'C'
END as grade
from table;
The text was updated successfully, but these errors were encountered:
What Happened
ELSE option is removed from CASE statement
Expected Behaviour
ELSE option should be kept
How to reproduce
Configuration
At least in playground I could not even get a simple SELECT CASE to return anything:
The text was updated successfully, but these errors were encountered: