Fix BE core if WHEN expr is null in CASE-WHEN clause (#521)

#518
This commit is contained in:
LingBin
2019-01-10 13:40:28 +08:00
committed by ZHAO Chun
parent d372b04e42
commit 0b50617542

View File

@ -174,7 +174,7 @@ public class CaseExpr extends Expr {
+ " is not of type boolean and not castable to type boolean.");
}
// Add a cast if necessary.
if (whenExpr.getType().isBoolean()) {
if (!whenExpr.getType().isBoolean()) {
castChild(Type.BOOLEAN, i);
}
}