Dmitry Lychagin has posted comments on this change. Change subject: [ASTERIXDB-2344] LIMIT pushdown for primary index ......................................................................
Patch Set 15: (2 comments) https://asterix-gerrit.ics.uci.edu/#/c/2541/15/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/operators/logical/visitors/UsedVariableVisitor.java File hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/operators/logical/visitors/UsedVariableVisitor.java: Line 109: op.getSelectCondition().getValue().getUsedVariables(usedVariables); One more thing. Here you need to exclude variables produced by this DataSourceScan operator from the variables used by select condition. (these variables produced by the operator, so they cannot be considered free variables for it) So get select condition's used variables into a temporary map, then remove op.getVariables() from that map, then add the remaining vars to the usedVariables. Line 312: op.getSelectCondition().getValue().getUsedVariables(usedVariables); Same comment as for line 109. Variables produced by the operator should be excluded from the used variables here. -- To view, visit https://asterix-gerrit.ics.uci.edu/2541 To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings Gerrit-MessageType: comment Gerrit-Change-Id: I824fcad79995325e12a1a81d629160025294b915 Gerrit-PatchSet: 15 Gerrit-Project: asterixdb Gerrit-Branch: master Gerrit-Owner: Luo Chen <cl...@uci.edu> Gerrit-Reviewer: Anon. E. Moose #1000171 Gerrit-Reviewer: Dmitry Lychagin <dmitry.lycha...@couchbase.com> Gerrit-Reviewer: Ian Maxon <ima...@apache.org> Gerrit-Reviewer: Jenkins <jenk...@fulliautomatix.ics.uci.edu> Gerrit-Reviewer: Luo Chen <cl...@uci.edu> Gerrit-Reviewer: Taewoo Kim (please use wangs...@gmail.com) <taew...@uci.edu> Gerrit-Reviewer: Taewoo Kim <wangs...@gmail.com> Gerrit-Reviewer: abdullah alamoudi <bamou...@gmail.com> Gerrit-HasComments: Yes