[
https://issues.apache.org/jira/browse/ASTERIXDB-3101?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17693306#comment-17693306
]
ASF subversion and git services commented on ASTERIXDB-3101:
------------------------------------------------------------
Commit 964ff7be6d2c026704001bd00430ae3a78bc66f6 in asterixdb's branch
refs/heads/master from Ali Alsuliman
[ https://gitbox.apache.org/repos/asf?p=asterixdb.git;h=964ff7be6d ]
[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
Reviewed-on: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/17316
Integration-Tests: Jenkins <[email protected]>
Tested-by: Jenkins <[email protected]>
Reviewed-by: Michael Blow <[email protected]>
> Long query compilation due to pushing down assign operators unnecessarily
> -------------------------------------------------------------------------
>
> Key: ASTERIXDB-3101
> URL: https://issues.apache.org/jira/browse/ASTERIXDB-3101
> Project: Apache AsterixDB
> Issue Type: Bug
> Components: COMP - Compiler
> Affects Versions: 0.9.6
> Reporter: Ali Alsuliman
> Assignee: Ali Alsuliman
> Priority: Major
> Fix For: 0.9.7
>
>
> One of the things that PushFieldAccessRule attempts to do is push an assign
> operator down as close as possible to the respective data scan operator. In
> the case where all the operators below the assign are other assign operators
> and they are all just field accesses to the data scan, pushing down the
> assign through each individual operator is not necessary which was shown to
> be problematic when the SELECT statement has a large number of fields causing
> the compilation of the query to take eternity. Instead, the assign operator
> could skip the intermediate assign operators and be connected to the data
> scan.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)