-
Notifications
You must be signed in to change notification settings - Fork 132
[OptRule] Collapse continuous Project plan node #1282
Conversation
| 7 | Project | 6 | | | ||
| 6 | Project | 5 | | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could these projects not be collapsed ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In order to avoid multiple calculations of the expression($-._path
referenced twice in the following project node), this situation was disabled.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent work.
# | ||
# This source code is licensed under Apache 2.0 License, | ||
# attached with Common Clause Condition 1.0, found in the LICENSES directory. | ||
Feature: Push Filter down LeftJoin rule |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please fix the feature name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed, thx~
namespace nebula { | ||
namespace opt { | ||
|
||
class CollapseProjectRule final : public OptRule { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Emmm, a pattern is always not enough to understand the details, so we better add some comment for the opt rule.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Already added.
How about the case that the result of collapsed Project may be used by other operator? |
Is this not checked in |
That seems only check whether data flow same with control flow |
Merge consecutive project plan nodes to avoid memory replication, and this may benefit column pruning in some cases.
example: match (v:player) with v, v.age/10 as age, v.name as name, abs(v.age) as abs return age-1 as res
old plan:
...->Project(v,age,name,abs)->Project(res)
plan applying this rule:
...->Project(res)
(res=v.age/10-1)