Skip to content

Commit

Permalink
Rebase and fix conflict.
Browse files Browse the repository at this point in the history
  • Loading branch information
CPWstatic committed Sep 20, 2019
1 parent 17a73cb commit 7302d46
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
10 changes: 5 additions & 5 deletions src/common/base/Base.h
Original file line number Diff line number Diff line change
Expand Up @@ -156,11 +156,11 @@ using VariantType = boost::variant<int64_t, double, bool, std::string>;
#endif

// reserved property names
constexpr char _ID[] = "_id";
constexpr char _SRC[] = "_src";
constexpr char _TYPE[] = "_type";
constexpr char _RANK[] = "_rank";
constexpr char _DST[] = "_dst";
constexpr char _ID[] = "_id";
constexpr char _SRC[] = "_src";
constexpr char _TYPE[] = "_type";
constexpr char _RANK[] = "_rank";
constexpr char _DST[] = "_dst";
// Useful type traits

// Tell if `T' is copy-constructible
Expand Down
2 changes: 1 addition & 1 deletion src/common/filter/Expressions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ std::string AliasPropertyExpression::toString() const {
std::string buf;
buf.reserve(64);
buf += *ref_;
if (*ref_ != "" && *ref_ != "$") {
if (*ref_ != "" && *ref_ != VAR_REF) {
buf += ".";
}
buf += *alias_;
Expand Down
4 changes: 4 additions & 0 deletions src/graph/test/YieldTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,7 @@ TEST_F(YieldTest, yieldVar) {
TEST_F(YieldTest, error) {
{
cpp2::ExecutionResponse resp;
// Reference input in a single yield sentence is meaningless.
auto query = "yield $-";
auto code = client_->execute(query, resp);
UNUSED(code);
Expand All @@ -421,6 +422,7 @@ TEST_F(YieldTest, error) {
{
cpp2::ExecutionResponse resp;
auto &player = players_["Boris Diaw"];
// Not support reference input and variable
auto fmt = var + "YIELD $var.team WHERE $-.start > 2005";
auto query = folly::stringPrintf(fmt.c_str(), player.vid());
auto code = client_->execute(query, resp);
Expand All @@ -429,6 +431,7 @@ TEST_F(YieldTest, error) {
{
cpp2::ExecutionResponse resp;
auto &player = players_["Boris Diaw"];
// Not support reference two diffrent variable
auto fmt = var + "YIELD $var.team WHERE $var1.start > 2005";
auto query = folly::stringPrintf(fmt.c_str(), player.vid());
auto code = client_->execute(query, resp);
Expand All @@ -437,6 +440,7 @@ TEST_F(YieldTest, error) {
{
cpp2::ExecutionResponse resp;
auto &player = players_["Boris Diaw"];
// Reference properties in single yield sentence is meaningless.
auto fmt = var + "YIELD $$.a.team";
auto query = folly::stringPrintf(fmt.c_str(), player.vid());
auto code = client_->execute(query, resp);
Expand Down

0 comments on commit 7302d46

Please sign in to comment.