Skip to content

Commit

Permalink
fix format.
Browse files Browse the repository at this point in the history
  • Loading branch information
xtcyclist committed Nov 10, 2022
1 parent 492f33f commit 9e705c0
Show file tree
Hide file tree
Showing 10 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion src/common/datatypes/Map.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ struct Map {
const Value& at(const std::string& key) const {
auto iter = kvs.find(key);
if (iter == kvs.end()) {
return Value::kNullUnknownProp;
return Value::kNullValue;
}
return iter->second;
}
Expand Down
2 changes: 1 addition & 1 deletion src/common/datatypes/Value.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const Value Value::kNullNaN(NullType::NaN);
const Value Value::kNullBadData(NullType::BAD_DATA);
const Value Value::kNullBadType(NullType::BAD_TYPE);
const Value Value::kNullOverflow(NullType::ERR_OVERFLOW);
const Value Value::kNullUnknownProp(NullType::UNKNOWN_PROP);
// const Value Value::kNullUnknownProp(NullType::UNKNOWN_PROP);
const Value Value::kNullDivByZero(NullType::DIV_BY_ZERO);
const Value Value::kNullOutOfRange(NullType::OUT_OF_RANGE);

Expand Down
2 changes: 1 addition & 1 deletion src/common/datatypes/Value.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ struct Value {
static const Value kNullBadData;
static const Value kNullBadType;
static const Value kNullOverflow;
static const Value kNullUnknownProp;
// static const Value kNullUnknownProp;
static const Value kNullDivByZero;
static const Value kNullOutOfRange;

Expand Down
2 changes: 1 addition & 1 deletion src/common/datatypes/test/ValueTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1463,7 +1463,7 @@ TEST(Value, typeName) {
EXPECT_EQ("BAD_DATA", Value::kNullBadData.typeName());
EXPECT_EQ("BAD_TYPE", Value::kNullBadType.typeName());
EXPECT_EQ("ERR_OVERFLOW", Value::kNullOverflow.typeName());
EXPECT_EQ("UNKNOWN_PROP", Value::kNullUnknownProp.typeName());
// EXPECT_EQ("UNKNOWN_PROP", Value::kNullUnknownProp.typeName());
EXPECT_EQ("DIV_BY_ZERO", Value::kNullDivByZero.typeName());
}

Expand Down
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::kNullUnknownProp;
return Value::kNullValue;
}
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::kNullUnknownProp, value);
ASSERT_EQ(Value::kNullValue, 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::kNullUnknownProp, value);
ASSERT_EQ(Value::kNullValue, 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::kNullUnknownProp, value);
ASSERT_EQ(Value::kNullValue, value);
}
{
auto *left = ConstantExpression::make(&pool, Value(t));
Expand Down
6 changes: 3 additions & 3 deletions src/common/time/TimeUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ class TimeUtils {
} else if (lowerProp == "microsecond") {
return static_cast<int>(dt.microsec);
} else {
return Value::kNullUnknownProp;
return Value::kNullValue;
}
}

Expand Down Expand Up @@ -160,7 +160,7 @@ class TimeUtils {
} else if (lowerProp == "day") {
return d.day;
} else {
return Value::kNullUnknownProp;
return Value::kNullValue;
}
}

Expand Down Expand Up @@ -203,7 +203,7 @@ class TimeUtils {
} else if (lowerProp == "microsecond") {
return t.microsec;
} else {
return Value::kNullUnknownProp;
return Value::kNullValue;
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/storage/exec/IndexEdgeScanNode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ Map<std::string, Value> IndexEdgeScanNode::decodeFromBase(const std::string& key
case QueryUtils::ReturnColType::kOther: {
auto field = edge_.back()->field(col);
if (field == nullptr) {
values[col] = Value::kNullUnknownProp;
values[col] = Value::kNullValue;
} else {
auto retVal = QueryUtils::readValue(reader.get(), col, field);
if (!retVal.ok()) {
Expand Down
2 changes: 1 addition & 1 deletion src/storage/exec/IndexVertexScanNode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ Map<std::string, Value> IndexVertexScanNode::decodeFromBase(const std::string& k
case QueryUtils::ReturnColType::kOther: {
auto field = tag_.back()->field(col);
if (field == nullptr) {
values[col] = Value::kNullUnknownProp;
values[col] = Value::kNullValue;
} else {
auto retVal = QueryUtils::readValue(reader.get(), col, field);
if (!retVal.ok()) {
Expand Down
8 changes: 4 additions & 4 deletions tests/tck/features/match/With.feature
Original file line number Diff line number Diff line change
Expand Up @@ -366,12 +366,12 @@ Feature: With clause
match p = (v)-[e]->(t) where id(v) in [100] and e.edgeProp_0_0 == true with e as e, t as t where e.edgeProp_0_0 == true return e.edgeProp_0_0;
"""
Then the result should be, in any order:
| e.edgeProp_0_0 |
| true |
| e.edgeProp_0_0 |
| true |
When executing query:
"""
match p = (v)-[e]->(t) where id(v) in [100] and e.edgeProp_0_0 == true with e as e, t as t where e.edgeProp_0_0 == true return e.edgeProp_1_0;
"""
Then the result should be, in any order:
| e.edgeProp_1_0 |
| NULL |
| e.edgeProp_1_0 |
| NULL |

0 comments on commit 9e705c0

Please sign in to comment.