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
Relax restriction around case-when operand (#3376)
The `CASE` expression requires the when-operand to be a `BooleanValue`,
which is too strict. The operand must return a `Boolean` type, but it
can be an `Value`, for example, this should work:
```sql
create table t1(col1 bigint, col2 boolean, primary key(col1));
insert into t1 values (1, true), (2, false);
select col2, coalesce(case when col2 then 42 end, 100) from t1;
true, 42
false, 100
```
This fixes#3374.
Copy file name to clipboardExpand all lines: fdb-relational-core/src/main/java/com/apple/foundationdb/relational/recordlayer/query/visitors/ExpressionVisitor.java
0 commit comments