Steven Jacobs has posted comments on this change.

Change subject: ASTERIXDB-1573 Allow Extension of Rewrite Rules
......................................................................


Patch Set 2:

(7 comments)

A few of my responses refer to things you can see done in my BADRuleSetFactory.
 
https://asterix-gerrit.ics.uci.edu/#/c/1227/8/asterix-bad/src/main/java/org/apache/asterix/bad/lang/BADRuleSetFactory.java

Please let me know if I'm missing a better way to do this.

https://asterix-gerrit.ics.uci.edu/#/c/1304/2/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/compiler/provider/DefaultRuleSetFactory.java
File 
asterixdb/asterix-algebra/src/main/java/org/apache/asterix/compiler/provider/DefaultRuleSetFactory.java:

Line 43:     public static List<Pair<AbstractRuleController, 
List<IAlgebraicRewriteRule>>> buildLogical() {
> Could we inline this method?
I did it this way so I could make these functions static, and thereby able to 
be called in Extension Rule Sets.


Line 72:     public static List<Pair<AbstractRuleController, 
List<IAlgebraicRewriteRule>>> buildPhysical() {
> Could we inline this method?
I did it this way so I could make these functions static, and thereby able to 
be called in Extension Rule Sets.


https://asterix-gerrit.ics.uci.edu/#/c/1304/2/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/compiler/provider/IRuleSetFactory.java
File 
asterixdb/asterix-algebra/src/main/java/org/apache/asterix/compiler/provider/IRuleSetFactory.java:

Line 32:      * @throws AlgebricksException
> I think that we don't need an exception here.
I did this so my implementation could throw an exception.


Line 34:     public List<Pair<AbstractRuleController, 
List<IAlgebraicRewriteRule>>> buildLogicalRewrites()
> s/buildLogicalRewrites/getLogicalRewrites/ ?
Done


Line 40:     public List<Pair<AbstractRuleController, 
List<IAlgebraicRewriteRule>>> buildPhysicalRewrites();
> s/buildPhysicalRewrites/getPhysicalRewrites/ ?
Done


https://asterix-gerrit.ics.uci.edu/#/c/1304/2/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/UnnestToDataScanRule.java
File 
asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/UnnestToDataScanRule.java:

Line 78:     public boolean rewritePost(Mutable<ILogicalOperator> opRef, 
IOptimizationContext context)
> Could we make this easier to extend by refactoring this list this:
Done


https://asterix-gerrit.ics.uci.edu/#/c/1304/2/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/translator/DefaultStatementExecutorFactory.java
File 
asterixdb/asterix-app/src/main/java/org/apache/asterix/app/translator/DefaultStatementExecutorFactory.java:

Line 31:     public QueryTranslator create(List<Statement> aqlStatements, 
SessionConfig conf,
> s/aqlStatements/statements/ ?
Done


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I7f59dea86b0ef4ee9d31b56766a97bd2b34ec02c
Gerrit-PatchSet: 2
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Steven Jacobs <[email protected]>
Gerrit-Reviewer: Jenkins <[email protected]>
Gerrit-Reviewer: Steven Jacobs <[email protected]>
Gerrit-Reviewer: Till Westmann <[email protected]>
Gerrit-Reviewer: Yingyi Bu <[email protected]>
Gerrit-Reviewer: abdullah alamoudi <[email protected]>
Gerrit-HasComments: Yes

Reply via email to