Skip to content

Commit

Permalink
null calc_value问题
Browse files Browse the repository at this point in the history
  • Loading branch information
HuXin0817 committed Oct 12, 2024
1 parent 05d65e5 commit 709796c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/observer/sql/expr/expression.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,10 @@ AttrType ArithmeticExpr::value_type() const
RC ArithmeticExpr::calc_value(const Value &left_value, const Value &right_value, Value &value) const
{
RC rc = RC::SUCCESS;
if (left_value.is_null() || right_value.is_null()) {
value.set_null(true);
return RC::SUCCESS;
}

const AttrType target_type = value_type();
value.set_type(target_type);
Expand Down

0 comments on commit 709796c

Please sign in to comment.