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

fix lookup crash #4552

Merged
merged 3 commits into from
Aug 18, 2022
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
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