diff options
author | Jinfeng Ni <jni@maprtech.com> | 2014-06-17 13:12:05 -0700 |
---|---|---|
committer | Jinfeng Ni <jni@maprtech.com> | 2014-06-18 07:14:10 -0700 |
commit | c373a278f637235e989787517416f141d42b2d29 (patch) | |
tree | 050ae74bef85fe1edcfba93362856a1689081e68 /common | |
parent | 42057800b1f2a4f1bdf771760c9c33a822fc435b (diff) |
DRILL-1006 : Fix case expression when conditions are expression of nullable types.
Diffstat (limited to 'common')
-rw-r--r-- | common/src/main/java/org/apache/drill/common/expression/visitors/ExpressionValidator.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/common/src/main/java/org/apache/drill/common/expression/visitors/ExpressionValidator.java b/common/src/main/java/org/apache/drill/common/expression/visitors/ExpressionValidator.java index c8b78575c..1bfb57d56 100644 --- a/common/src/main/java/org/apache/drill/common/expression/visitors/ExpressionValidator.java +++ b/common/src/main/java/org/apache/drill/common/expression/visitors/ExpressionValidator.java @@ -78,14 +78,14 @@ public class ExpressionValidator implements ExprVisitor<Void, ErrorCollector, Ru int i = 0; for (IfCondition c : ifExpr.conditions) { MajorType mt = c.condition.getMajorType(); - if (mt.getMode() != DataMode.REQUIRED || mt.getMinorType() != MinorType.BIT) { + if ( mt.getMinorType() != MinorType.BIT) { errors .addGeneralError( c.condition.getPosition(), String .format( - "Failure composing If Expression. All conditions must return a required value and be of type boolean. Condition %d was DatMode %s and Type %s.", - i, mt.getMode(), mt.getMinorType())); + "Failure composing If Expression. All conditions must return a boolean type. Condition %d was of Type %s.", + i, mt.getMinorType())); } i++; } |