Till Westmann has posted comments on this change.

Change subject: Enhanced Insert AQL
......................................................................


Patch Set 21: Code-Review+2

(6 comments)

Just a few tiny comments. The fixes to the manual should probably happen, but 
this could also be a different change.

Two things that might be worth considering (maybe you already did and found 
that it's bad ...) are:

a) Avoid the isSink flag and to instead assume that a commit operator is never 
a sink and have another operator on top that "closes the plan". It seems that 
that would reduce the branches in the commit operator and reduce the 
probability of a missing check.

b) Find a better solution than "instanceof XOperator" (where X usually is 
"Commit").

Both of those considerations should probably be addressed in a different change 
(if you determine that they should be addressed at all).

https://asterix-gerrit.ics.uci.edu/#/c/1150/21/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/am/AbstractIntroduceAccessMethodRule.java
File 
asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/am/AbstractIntroduceAccessMethodRule.java:

Line 172:                         || chosenIndex.getIndexType() == 
IndexType.LENGTH_PARTITIONED_NGRAM_INVIX
Pull chosenIndex.getIndexType() out?


https://asterix-gerrit.ics.uci.edu/#/c/1150/21/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/translator/QueryTranslator.java
File 
asterixdb/asterix-app/src/main/java/org/apache/asterix/app/translator/QueryTranslator.java:

Line 1870: 
Why the empty line?


https://asterix-gerrit.ics.uci.edu/#/c/1150/21/asterixdb/asterix-doc/src/site/markdown/aql/manual.md
File asterixdb/asterix-doc/src/site/markdown/aql/manual.md:

Line 838: The optional "as Variable" provides a variable binding for the 
inserted records, which can be used in the "returning" clause
period.


Line 839: The optional "returning Query" allows users to run simple 
queries/functions on the records returned by the insert
period.


Line 840: This query cannot refer to any datasets
period.


https://asterix-gerrit.ics.uci.edu/#/c/1150/21/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/InsertStatement.java
File 
asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/statement/InsertStatement.java:

Line 114:         return Category.QUERY;
return var == null ? Category.UPDATE : Category.QUERY;


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I65789d2a861d15232dd29156a6987d0635ec6c94
Gerrit-PatchSet: 21
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Steven Jacobs <sjaco...@ucr.edu>
Gerrit-Reviewer: Jenkins <jenk...@fulliautomatix.ics.uci.edu>
Gerrit-Reviewer: Michael Blow <mb...@apache.org>
Gerrit-Reviewer: Michael Carey <dtab...@gmail.com>
Gerrit-Reviewer: Steven Jacobs <sjaco...@ucr.edu>
Gerrit-Reviewer: Till Westmann <ti...@apache.org>
Gerrit-Reviewer: Yingyi Bu <buyin...@gmail.com>
Gerrit-Reviewer: abdullah alamoudi <bamou...@gmail.com>
Gerrit-HasComments: Yes

Reply via email to