Ali Alsuliman has posted comments on this change.

Change subject: [ASTERIXDB-2015][IDX] Introduce Primary Index Optimization Rule
......................................................................


Patch Set 8:

(6 comments)

https://asterix-gerrit.ics.uci.edu/#/c/2111/6/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/am/IntroducePrimaryIndexForAggregationRule.java
File 
asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/am/IntroducePrimaryIndexForAggregationRule.java:

Line 60:  * ^
> It seems to me that an aggregate followed by assign is really not a prerequ
Yes, aggregate->assign is not a prerequisite. That's why its existence is 
optional. Assign operator will be there for the use case: count(*) where the 
query plan has assign $ = 1. Originally, the optimization was for count(*), but 
I wrote the rule to work for aggregations in general (involving only PKs)


Line 91:  */
> Let's make field type List<> and use ArrayList<> as implementation, so we a
Done


Line 139:     private Pair<Mutable<ILogicalOperator>,Mutable<ILogicalOperator>> 
findScanAndAssignOperator(
> I think an aggregate operator can only have one input.
Done


Line 156:             UnnestMapOperator unnestMapOperator = (UnnestMapOperator) 
scanOpRef.getValue();
> Use AbstractFunctionCallExpression here instead of UnnestingFunctionCallExp
Done


Line 195:                     dataset.getPrimaryKeys().size(), 
scanOperator.getVariables().size());
> If you're replacing index-search() then I think you can just get requiresBr
Done


Line 208:                         
scanOperator.getInputs().get(0).getValue().getExecutionMode() ==
> This is not an 'eq' condition. We're getting everything from the index.
Done


-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2111
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I3bbb2b5e1f25e61928d73b866e91c592ce0bf954
Gerrit-PatchSet: 8
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Ali Alsuliman <ali.al.solai...@gmail.com>
Gerrit-Reviewer: Ali Alsuliman <ali.al.solai...@gmail.com>
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Dmitry Lychagin <dmitry.lycha...@couchbase.com>
Gerrit-Reviewer: Jenkins <jenk...@fulliautomatix.ics.uci.edu>
Gerrit-Reviewer: Taewoo Kim <taew...@uci.edu>
Gerrit-Reviewer: Till Westmann <ti...@apache.org>
Gerrit-HasComments: Yes

Reply via email to