Yingyi Bu has posted comments on this change. Change subject: ASTERIXDB-1451: Fix type propagation to enforced indexes ......................................................................
Patch Set 3: (2 comments) https://asterix-gerrit.ics.uci.edu/#/c/1109/3/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/IntroduceSecondaryIndexInsertDeleteRule.java File asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/IntroduceSecondaryIndexInsertDeleteRule.java: Line 280: .add(new MutableObject<>(new VariableReferenceExpression(insertOp.getPrevRecordVar()))); For the newly added code (Upsert), can we cast the individual indexed field(s) instead of the entire record, as the function CastType works for any non-record types as well? For the current open index implementation, it's a big waste to cast the entire record: https://issues.apache.org/jira/browse/ASTERIXDB-1404. I have unified different cast functions into cast-type, which can cast any input typed item into any required type, not necessarily a record. Line 643: Stack<Pair<ARecordType, String>> nestedTypeStack = new Stack<>(); > MAJOR SonarQube violation: This should be fixed? -- To view, visit https://asterix-gerrit.ics.uci.edu/1109 To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings Gerrit-MessageType: comment Gerrit-Change-Id: I1b4572ca541e6a9fbaf1d7f107f76630c854abdd Gerrit-PatchSet: 3 Gerrit-Project: asterixdb Gerrit-Branch: master Gerrit-Owner: Murtadha Hubail <hubail...@gmail.com> Gerrit-Reviewer: Jenkins <jenk...@fulliautomatix.ics.uci.edu> Gerrit-Reviewer: Yingyi Bu <buyin...@gmail.com> Gerrit-Reviewer: abdullah alamoudi <bamou...@gmail.com> Gerrit-HasComments: Yes