Skip to content

Commit

Permalink
Revert "Remove all UNKNOWN_PROP as a type of null. (vesoft-inc#4907)" (
Browse files Browse the repository at this point in the history
…vesoft-inc#5149)

This reverts commit aa62416.

Co-authored-by: Sophie <[email protected]>
  • Loading branch information
2 people authored and czpmango committed Jan 10, 2023
1 parent 59b3523 commit 476bb08
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/common/expression/AttributeExpression.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const Value &AttributeExpression::eval(ExpressionContext &ctx) {
return iter->second;
}
}
return Value::kNullValue;
return Value::kNullUnknownProp;
}
case Value::Type::EDGE: {
DCHECK(!rvalue.getStr().empty());
Expand Down
6 changes: 3 additions & 3 deletions src/common/expression/test/AttributeExpressionTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ TEST_F(AttributeExpressionTest, DateTimeAttribute) {
auto *right = LabelExpression::make(&pool, "not exist attribute");
auto expr = AttributeExpression::make(&pool, left, right);
auto value = Expression::eval(expr, gExpCtxt);
ASSERT_EQ(Value::kNullValue, value);
ASSERT_EQ(Value::kNullUnknownProp, value);
}
{
auto *left = ConstantExpression::make(&pool, Value(dt));
Expand All @@ -148,7 +148,7 @@ TEST_F(AttributeExpressionTest, DateTimeAttribute) {
auto *right = LabelExpression::make(&pool, "not exist attribute");
auto expr = AttributeExpression::make(&pool, left, right);
auto value = Expression::eval(expr, gExpCtxt);
ASSERT_EQ(Value::kNullValue, value);
ASSERT_EQ(Value::kNullUnknownProp, value);
}
{
auto *left = ConstantExpression::make(&pool, Value(d));
Expand All @@ -162,7 +162,7 @@ TEST_F(AttributeExpressionTest, DateTimeAttribute) {
auto *right = LabelExpression::make(&pool, "not exist attribute");
auto expr = AttributeExpression::make(&pool, left, right);
auto value = Expression::eval(expr, gExpCtxt);
ASSERT_EQ(Value::kNullValue, value);
ASSERT_EQ(Value::kNullUnknownProp, value);
}
{
auto *left = ConstantExpression::make(&pool, Value(t));
Expand Down

0 comments on commit 476bb08

Please sign in to comment.