You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@asterixdb.apache.org by AsterixDB Code Review <do...@asterix-gerrit.ics.uci.edu> on 2023/01/27 09:50:54 UTC

Change in asterixdb[neo]: [ASTERIXDB-3101][COMP] Optimize pushing assign ops down

From Ali Alsuliman <al...@gmail.com>:

Attention is currently required from: Ali Alsuliman.
Hello Jenkins, Anon. E. Moose #1000171, 

I'd like you to reexamine a change. Please visit

    https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/17316

to look at the new patch set (#3).

Change subject: [ASTERIXDB-3101][COMP] Optimize pushing assign ops down
......................................................................

[ASTERIXDB-3101][COMP] Optimize pushing assign ops down

- user model changes: no
- storage format changes: no
- interface changes: yes

Details:
One of the things that PushFieldAccessRule attempts to do is
push assign operator down as close as possible to the respective
data scan operator. The assign operator is pushed recursively
through the operators below it one by one until the data scan is
reached. This becomes expensive when there is a large number
of assigns. In the case where all the operators below the assign
operator are other assign operators, the assign operator
could be moved directly above the data-scan skipping all
the intermediate assign operators.

- add default method to IAlgebraicRewriteRule to allow the rules
  to know if they are about to rewrite a nested plan root.

Optimize ExtractCommonExpressionsRule since the current traversal
of operators becomes expensive with a large number of operators.
- optimize ExtractCommonExpressionsRule to work on only roots of
  plans since the implementation descends to children recursively.
  check if the operator was already rewritten after descending to
  the children to allow post order traversal from the root.

Change-Id: I035b72089f973bb08dccf5f9305f8b06da7fc458
---
M hyracks-fullstack/algebricks/algebricks-compiler/src/main/java/org/apache/hyracks/algebricks/compiler/rewriter/rulecontrollers/SequentialOnceRuleController.java
M asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/PushFieldAccessRule.java
M hyracks-fullstack/algebricks/algebricks-compiler/src/main/java/org/apache/hyracks/algebricks/compiler/rewriter/rulecontrollers/SequentialFirstRuleCheckFixpointRuleController.java
M hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/rewriter/base/IAlgebraicRewriteRule.java
M hyracks-fullstack/algebricks/algebricks-compiler/src/main/java/org/apache/hyracks/algebricks/compiler/rewriter/rulecontrollers/SequentialFixpointRuleController.java
M hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/rewriter/base/AbstractRuleController.java
M hyracks-fullstack/algebricks/algebricks-rewriter/src/main/java/org/apache/hyracks/algebricks/rewriter/rules/ExtractCommonExpressionsRule.java
7 files changed, 221 insertions(+), 102 deletions(-)


  git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb refs/changes/16/17316/3
-- 
To view, visit https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/17316
To unsubscribe, or for help writing mail filters, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-Project: asterixdb
Gerrit-Branch: neo
Gerrit-Change-Id: I035b72089f973bb08dccf5f9305f8b06da7fc458
Gerrit-Change-Number: 17316
Gerrit-PatchSet: 3
Gerrit-Owner: Ali Alsuliman <al...@gmail.com>
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-Attention: Ali Alsuliman <al...@gmail.com>
Gerrit-MessageType: newpatchset