diff --git a/src/util/ExpressionUtils.h b/src/util/ExpressionUtils.h index 9a18f1267c66f2e83e82a8ccefa1cb8b99d7871e..4ba7a4df5d7597f1df1f2b0dd20284b42bb084c2 100644 --- a/src/util/ExpressionUtils.h +++ b/src/util/ExpressionUtils.h @@ -152,7 +152,10 @@ public: Expression::Kind::kMinus, Expression::Kind::kMultiply, Expression::Kind::kDivision, - Expression::Kind::kMod}); + Expression::Kind::kMod, + Expression::Kind::kPredicate, + Expression::Kind::kListComprehension, + Expression::Kind::kReduce}); } // **Expression Transformation** diff --git a/tests/tck/features/expression/Predicate.feature b/tests/tck/features/expression/Predicate.feature index 5c07ab98d1cc6e2633e49fe33bd4cf0025b3ca08..00da640611f6d2c5ab70e0c559841c13aa392a5d 100644 --- a/tests/tck/features/expression/Predicate.feature +++ b/tests/tck/features/expression/Predicate.feature @@ -96,3 +96,34 @@ Feature: Predicate Then the result should be, in any order: | r | | NULL | + + Scenario: aggregate function in collection + Given a graph with space named "nba" + When executing query: + """ + unwind [1, 2, 3, 4, 5] as a return a * 2 as x | return any(n in collect($-.x) where n > 5) as myboo + """ + Then the result should be, in any order: + | myboo | + | true | + When executing query: + """ + unwind [1, 2, 3, 4, 5] as a return a * 2 as x | return All(n in collect($-.x) where n > 5) as myboo + """ + Then the result should be, in any order: + | myboo | + | false | + When executing query: + """ + unwind [1, 2, 3, 4, 5] as a return a * 2 as x | return single(n in collect($-.x) where n > 5) as myboo + """ + Then the result should be, in any order: + | myboo | + | false | + When executing query: + """ + unwind [1, 2, 3, 4, 5] as a return a * 2 as x | return None(n in collect($-.x) where n > 5) as myboo + """ + Then the result should be, in any order: + | myboo | + | false |