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

fix #1012: Collect values from InputExpression crash the nebula graphd #1015

Merged
merged 1 commit into from
May 10, 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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 1 addition & 11 deletions src/util/ExpressionUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -139,17 +139,7 @@ Expression *ExpressionUtils::rewriteAgg2VarProp(const Expression *expr) {

return RewriteVisitor::transform(expr,
std::move(matcher),
std::move(rewriter),
{Expression::Kind::kFunctionCall,
Expression::Kind::kTypeCasting,
Expression::Kind::kAdd,
Expression::Kind::kMinus,
Expression::Kind::kMultiply,
Expression::Kind::kDivision,
Expression::Kind::kMod,
Expression::Kind::kPredicate,
Expression::Kind::kListComprehension,
Expression::Kind::kReduce});
std::move(rewriter));
}

std::unique_ptr<Expression> ExpressionUtils::foldConstantExpr(const Expression *expr) {
Expand Down
14 changes: 14 additions & 0 deletions tests/tck/features/aggregate/Agg.feature
Original file line number Diff line number Diff line change
Expand Up @@ -466,6 +466,20 @@ Feature: Basic Aggregate and GroupBy
Then the result should be, in order, with relax comparison:
| count | sum | avg | min | max | std | b1 | b2 | b3 |
| 0 | 0 | NULL | NULL | NULL | NULL | NULL | NULL | NULL |
When executing query:
"""
UNWIND [1,2,3] AS d RETURN d | YIELD 1 IN COLLECT($-.d) AS b
"""
Then the result should be, in order, with relax comparison:
| b |
| True |
When executing query:
"""
UNWIND [1,2,3] AS d RETURN d | YIELD ANY(l IN COLLECT($-.d) WHERE l==1) AS b
"""
Then the result should be, in order, with relax comparison:
| b |
| True |

Scenario: Empty input
When executing query:
Expand Down