Skip to content

Commit

Permalink
return plain null values if tag or prop does not exist.
Browse files Browse the repository at this point in the history
  • Loading branch information
xtcyclist committed Dec 29, 2022
1 parent a4c09c2 commit e078996
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/common/expression/AttributeExpression.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,10 @@ const Value &AttributeExpression::eval(ExpressionContext &ctx) {
result_ = time::TimeUtils::getDateTimeAttr(lvalue.getDateTime(), rvalue.getStr());
return result_;
default:
if (lvalue.isNull() && lvalue.getNull() == NullType::UNKNOWN_PROP) {
// return UNKNOWN_PROP as plain null values, instead of bad type.
return Value::kNullValue;
}
return Value::kNullBadType;
}
}
Expand Down

0 comments on commit e078996

Please sign in to comment.