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 2025/01/31 21:33:25 UTC

Change in asterixdb[master]: [ASTERIXDB-3543][COMP] Do not inline expressions containing collectio...

From Vijay Sarathy <vi...@couchbase.com>:

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

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

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

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

Change subject: [ASTERIXDB-3543][COMP] Do not inline expressions containing collection record
......................................................................

[ASTERIXDB-3543][COMP] Do not inline expressions containing collection record

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

Details:
Inlining expressions involving a collection's record
(e.g. field access $$col_rec.getField("x")) into the final
assign op (SELECT's assign op) can make query execution take
a long time especially if the records are not small. This is
because the $$col_rec has to be kept along in the frames from
the originating data-scan all the way through the operators
to the final assign op. This can prevent early projections
that aims to reduce the tuples size and increase the number
of tuples in a given frame.

This patch is to prevent inlining under certain conditions.
If the path from the source operator producing the expression
to the final assign op contains:
1. Operators with >= 2 inputs (e.g. JOINS).
2. ORDER-BY operator.
3. UNNEST operator.

Then we do not inline those expressions involving the data-scan
produced variables.

Ext-ref: MB-64252

Change-Id: Ia818f11e45bf66e3b4807938bfb635c70fa9c496
---
A asterixdb/asterix-app/src/test/resources/optimizerts/queries/inline-single-reference/inline-single-reference_2.sqlpp
M asterixdb/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/ngram-jaccard_04.plan
A asterixdb/asterix-app/src/test/resources/optimizerts/queries/inline-single-reference/inline-single-reference_1.sqlpp
A asterixdb/asterix-app/src/test/resources/optimizerts/queries/inline-single-reference/inline-single-reference_3.sqlpp
A asterixdb/asterix-app/src/test/resources/optimizerts/results/inline-single-reference/inline-single-reference_4.plan
M asterixdb/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/ngram-jaccard-check_04.plan
M asterixdb/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/word-jaccard_04.plan
M asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/PushLimitIntoPrimarySearchRule.java
A asterixdb/asterix-app/src/test/resources/optimizerts/results/inline-single-reference/inline-single-reference_2.plan
M asterixdb/asterix-app/src/test/resources/optimizerts/results/inverted-index-join/word-jaccard-check_04.plan
A asterixdb/asterix-app/src/test/resources/optimizerts/results/inline-single-reference/inline-single-reference_1.plan
M hyracks-fullstack/algebricks/algebricks-rewriter/src/main/java/org/apache/hyracks/algebricks/rewriter/rules/InlineVariablesRule.java
M hyracks-fullstack/algebricks/algebricks-rewriter/src/main/java/org/apache/hyracks/algebricks/rewriter/rules/InlineSingleReferenceVariablesRule.java
A asterixdb/asterix-app/src/test/resources/optimizerts/queries/inline-single-reference/inline-single-reference_4.sqlpp
A asterixdb/asterix-app/src/test/resources/optimizerts/results/inline-single-reference/inline-single-reference_3.plan
15 files changed, 364 insertions(+), 16 deletions(-)


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

Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Change-Id: Ia818f11e45bf66e3b4807938bfb635c70fa9c496
Gerrit-Change-Number: 19351
Gerrit-PatchSet: 13
Gerrit-Owner: Vijay Sarathy <vi...@couchbase.com>
Gerrit-Reviewer: Ali Alsuliman <al...@gmail.com>
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-Reviewer: Peeyush Gupta <pe...@couchbase.com>
Gerrit-Reviewer: Vijay Sarathy <vi...@couchbase.com>
Gerrit-Attention: Peeyush Gupta <pe...@couchbase.com>
Gerrit-Attention: Ali Alsuliman <al...@gmail.com>
Gerrit-Attention: Vijay Sarathy <vi...@couchbase.com>
Gerrit-MessageType: newpatchset