Skip to content
This repository has been archived by the owner on Dec 1, 2022. It is now read-only.

Commit

Permalink
Fix the go return bad_type when the vertex without the tag (#1273)
Browse files Browse the repository at this point in the history
Co-authored-by: Yee <[email protected]>
  • Loading branch information
laura-ding and yixinglu authored Jul 20, 2021
1 parent 8e6730a commit ae423ac
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/context/Iterator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,9 @@ const Value& GetNeighborsIter::getTagProp(const std::string& tag,
auto colId = index->second.colIdx;
auto& row = *currentRow_;
DCHECK_GT(row.size(), colId);
if (row[colId].empty()) {
return Value::kEmpty;
}
if (!row[colId].isList()) {
return Value::kNullBadType;
}
Expand Down
11 changes: 11 additions & 0 deletions tests/tck/features/go/GO.feature
Original file line number Diff line number Diff line change
Expand Up @@ -1821,3 +1821,14 @@ Feature: Go Sentence
"""
Then the result should be, in any order, with relax comparison:
| like._dst |

Scenario: with no existed tag
When executing query:
"""
GO FROM 'Tony Parker' OVER like YIELD $$.player.name, $^.team.name
"""
Then the result should be, in any order, with relax comparison:
| $$.player.name | $^.team.name |
| "LaMarcus Aldridge" | EMPTY |
| "Manu Ginobili" | EMPTY |
| "Tim Duncan" | EMPTY |

0 comments on commit ae423ac

Please sign in to comment.