-
Notifications
You must be signed in to change notification settings - Fork 317
Remove unused LogicalScanNodeTable's properties #5055
base: master
Are you sure you want to change the base?
Conversation
| #include "planner/operator/persistent/logical_insert.h" | ||
| #include "planner/operator/persistent/logical_merge.h" | ||
| #include "planner/operator/persistent/logical_set.h" | ||
| #include <planner/operator/scan/logical_scan_node_table.h> |
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.
change <> to "" for consistency
| std::make_shared<LogicalProjection>(std::move(expressions), op->getChild(childIdx)); | ||
| auto child = op->getChild(childIdx); | ||
| // reset scan node table properties | ||
| if (child->getOperatorType() == LogicalOperatorType::SCAN_NODE_TABLE) { |
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.
I would add a new optimizer that remove any unnecessary projection instead of coupling the logic inside projection push down optimizer.
| if (scanNodeTable.getProperties().empty()) { | ||
| return false; | ||
| } | ||
| bool hasPropertiesInUse = false; |
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.
First I wanna understand on which query this optimization will take effect so that we can add test & benchmark.
Second, I think we can do better than clearProperty. Scan operator can scan a subset of its current properties.
| } | ||
| scanState = std::make_unique<NodeTableScanState>( | ||
| resultSet->getValueVector(info.nodeIDPos).get(), outVectors, outVectors[0]->state); | ||
| if (outVectors.empty()) { |
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.
@ray6080 should review this.
Description
Contributor agreement