Skip to content

Commit

Permalink
fix lookup (#4552)
Browse files Browse the repository at this point in the history
fix

Co-authored-by: jimingquan <mingquan.ji@vesoft.com>
Co-authored-by: Sophie <84560950+Sophie-Xie@users.noreply.github.com>
  • Loading branch information
3 people committed Sep 7, 2022
1 parent ef6d6a0 commit 6354045
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ StatusOr<TransformResult> OptimizeEdgeIndexScanByFilterRule::transform(
if (static_cast<ListExpression*>(inExpr->right())->size() > 1) {
return TransformResult::noTransform();
} else {
transformedExpr = graph::ExpressionUtils::rewriteInExpr(condition);
transformedExpr = graph::ExpressionUtils::rewriteInExpr(inExpr);
}
if (OptimizerUtils::relExprHasIndex(inExpr, indexItems)) {
return TransformResult::noTransform();
Expand Down
7 changes: 7 additions & 0 deletions tests/tck/features/lookup/LookUp.feature
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,13 @@ Feature: LookUpTest_Vid_String
Then the result should be, in any order:
| src | dst | rank |
| "200" | "201" | 0 |
When executing query:
"""
LOOKUP ON lookup_edge_1 WHERE lookup_edge_1.col2 IN [201] and lookup_edge_1.col2>3 YIELD src(edge) as src, dst(Edge) as dst, rank(edge) as rank
"""
Then the result should be, in any order:
| src | dst | rank |
| "200" | "201" | 0 |
When executing query:
"""
LOOKUP ON lookup_edge_2 WHERE lookup_edge_2.col1 == 200 YIELD edge as e
Expand Down

0 comments on commit 6354045

Please sign in to comment.