Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change iterRef to iter #5662

Merged
merged 1 commit into from
Aug 2, 2023
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/graph/executor/query/ExpandAllExecutor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ namespace graph {
Status ExpandAllExecutor::buildRequestVids() {
SCOPED_TIMER(&execTime_);
const auto& inputVar = expand_->inputVar();
auto inputIter = ectx_->getResult(inputVar).iterRef();
auto iter = static_cast<SequentialIter*>(inputIter);
auto inputIter = ectx_->getResult(inputVar).iter();
auto iter = static_cast<SequentialIter*>(inputIter.get());
size_t iterSize = iter->size();
nextStepVids_.reserve(iterSize);
if (joinInput_) {
Expand Down
4 changes: 2 additions & 2 deletions src/graph/executor/query/ExpandExecutor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ namespace graph {
Status ExpandExecutor::buildRequestVids() {
SCOPED_TIMER(&execTime_);
const auto& inputVar = expand_->inputVar();
auto inputIter = ectx_->getResult(inputVar).iterRef();
auto iter = static_cast<SequentialIter*>(inputIter);
auto inputIter = ectx_->getResult(inputVar).iter();
auto iter = static_cast<SequentialIter*>(inputIter.get());
size_t iterSize = iter->size();
nextStepVids_.reserve(iterSize);
QueryExpressionContext ctx(ectx_);
Expand Down
4 changes: 2 additions & 2 deletions src/graph/executor/query/TraverseExecutor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ folly::Future<Status> TraverseExecutor::execute() {
Status TraverseExecutor::buildRequestVids() {
SCOPED_TIMER(&execTime_);
const auto& inputVar = traverse_->inputVar();
auto inputIter = ectx_->getResult(inputVar).iterRef();
auto iter = static_cast<SequentialIter*>(inputIter);
auto inputIter = ectx_->getResult(inputVar).iter();
auto iter = static_cast<SequentialIter*>(inputIter.get());
size_t iterSize = iter->size();
vids_.reserve(iterSize);
auto* src = traverse_->src();
Expand Down
15 changes: 15 additions & 0 deletions tests/tck/features/go/GO.feature
Original file line number Diff line number Diff line change
Expand Up @@ -2050,3 +2050,18 @@ Feature: Go Sentence
| "Grant Hill" | "Grant Hill" |
| "Vince Carter" | "Vince Carter" |
| "Yao Ming" | "Yao Ming" |

Scenario: multiple statements refer to the same variable
When executing query:
"""
$m1= LOOKUP ON player WHERE player.name == 'Tim Duncan' YIELD id(vertex) AS vid;
$m2 = GO 2 TO 10 STEPS FROM $m1.vid OVER like YIELD distinct id($$) AS dst
INTERSECT
GO 4 TO 7 STEPS FROM $m1.vid OVER like REVERSELY YIELD distinct id($$) AS dst
"""
Then the result should be, in any order, with relax comparison:
| dst |
| "LaMarcus Aldridge" |
| "Tim Duncan" |
| "Manu Ginobili" |
| "Tony Parker" |
Loading