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

Fix the go return bad_type when the vertex without the tag #1273

Merged
merged 2 commits into from Jul 20, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/context/Iterator.cpp
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
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 |