Dmitry Lychagin has posted comments on this change.

Change subject: [ASTERIXDB-2296][COMP] proper handling of an optional subfield 
type
......................................................................


Patch Set 1:

(3 comments)

https://asterix-gerrit.ics.uci.edu/#/c/2419/1/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 881:                     if (subFieldType instanceof AUnionType) {
There's a helper method for extracting actual type from a union: 
TypeComputeUtils.getActualType(). Can you use that?


Line 884:                     if (!(subFieldType instanceof ARecordType)) {
Can we do getTypeTag() != OBJECT  here instead of instanceof?


Line 888:                     fieldName = sourceVar.equals(metaVar) ? 
((ARecordType) subFieldType).getFieldNames()[fieldIndex]
why conditional (?) expression here? both branches seem to be the same.


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ia80b6dbf549b77295f310b7c6f3a3f3f5a323114
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Taewoo Kim <wangs...@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-HasComments: Yes

Reply via email to