Skip to content

Commit

Permalink
add comments for PushFilterDownAggregateRule
Browse files Browse the repository at this point in the history
  • Loading branch information
czpmango committed Feb 21, 2022
1 parent f42a4a9 commit 3b13e8b
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions src/graph/optimizer/rule/PushFilterDownAggregateRule.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,36 @@
namespace nebula {
namespace opt {

/*
Push the [[Filter]] down [[Aggregate]]
Required conditions:
1. Match the pattern
2. Filter contains only non-aggregated items
Benefits:
1. Filter data early to optimize performance
Tranformation:
Before:
+------+------+
| Filter |
+------+------+
|
+------+------+
| Aggregate |
+------+------+
After:
+------+------+
| Aggregate |
+------+------+
|
+------+------+
| Filter |
+------+------+
*/
class PushFilterDownAggregateRule final : public OptRule {
public:
const Pattern &pattern() const override;
Expand Down

0 comments on commit 3b13e8b

Please sign in to comment.