>From <[email protected]>:
[email protected] has uploaded this change for review. (
https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/20489?usp=email )
Change subject: [ASTERIXDB-3635][COMP] Tune single dataset index costing (ARRAY)
......................................................................
[ASTERIXDB-3635][COMP] Tune single dataset index costing (ARRAY)
Change-Id: I5f8ac2170fd6b2beef14d90cd8b93411f0f19ba8
---
M
asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/am/IntroduceSelectAccessMethodRule.java
1 file changed, 10 insertions(+), 8 deletions(-)
git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb
refs/changes/89/20489/1
diff --git
a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/am/IntroduceSelectAccessMethodRule.java
b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/am/IntroduceSelectAccessMethodRule.java
index df9fb2c..d3efcac 100644
---
a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/am/IntroduceSelectAccessMethodRule.java
+++
b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/am/IntroduceSelectAccessMethodRule.java
@@ -495,6 +495,16 @@
if (continueCheck &&
context.getPhysicalOptimizationConfig().isArrayIndexEnabled()
&&
SelectFromSubplanRewrite.isApplicableForRewriteCursory(indexProvider,
selectOp)) {
+
+ // If there exists a SUBPLAN in our plan, and we are
conditioning on a variable, attempt to rewrite
+ // this subplan to allow an array-index AM to be introduced.
Again, this rewrite is to be used
+ // **solely** for the purpose of changing a DATA-SCAN into a
non-index-only plan branch.
+ // the order of these rewrites was switched on Glenn's
suggestion
+ if (rewriteLocallyAndTransform(selectRef, context,
selectFromSubplanRewrite, checkApplicableOnly,
+ chosenIndexes, analyzedAMs)) {
+ return true;
+ }
+
// If there exists a composite atomic-array index, our
conjuncts will be split across multiple
// SELECTs. This rewrite is to be used **solely** for the
purpose of changing a DATA-SCAN into a
// non-index-only plan branch. No nodes introduced from this
rewrite will be used beyond this point.
@@ -503,14 +513,6 @@
chosenIndexes, analyzedAMs)) {
return true;
}
-
- // If there exists a SUBPLAN in our plan, and we are
conditioning on a variable, attempt to rewrite
- // this subplan to allow an array-index AM to be introduced.
Again, this rewrite is to be used
- // **solely** for the purpose of changing a DATA-SCAN into a
non-index-only plan branch.
- if (rewriteLocallyAndTransform(selectRef, context,
selectFromSubplanRewrite, checkApplicableOnly,
- chosenIndexes, analyzedAMs)) {
- return true;
- }
}
// Check the condition of SELECT operator is a function call since
--
To view, visit https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/20489?usp=email
To unsubscribe, or for help writing mail filters, visit
https://asterix-gerrit.ics.uci.edu/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Change-Id: I5f8ac2170fd6b2beef14d90cd8b93411f0f19ba8
Gerrit-Change-Number: 20489
Gerrit-PatchSet: 1
Gerrit-Owner: [email protected]