Yingyi Bu has posted comments on this change. Change subject: ASTERIXDB-1109: Fixed deletion of records from open secondary index ......................................................................
Patch Set 3: (4 comments) https://asterix-gerrit.ics.uci.edu/#/c/462/3/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/prettyprint/PlanPrettyPrinter.java File algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/prettyprint/PlanPrettyPrinter.java: Line 35: Map<AbstractLogicalOperator, Boolean> printedOpMap = new HashMap<>(); What's the purpose of introducing maps here? It looks only map.put() is called but map.get() is not. https://asterix-gerrit.ics.uci.edu/#/c/462/3/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/rewriter/base/AbstractRuleController.java File algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/rewriter/base/AbstractRuleController.java: Line 73: new HashMap<AbstractLogicalOperator, Boolean>()); Why this empty map is need here? It seems the states of the resulting map is never used. https://asterix-gerrit.ics.uci.edu/#/c/462/3/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/rewriter/base/AlgebricksOptimizationContext.java File algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/rewriter/base/AlgebricksOptimizationContext.java: Line 68: private final Map<LogicalVariable, FunctionalDependency> recordToPrimaryKey = new HashMap<LogicalVariable, FunctionalDependency>(); recordToPrimaryKey and primaryKeyRecord maps seem tricky, because a rewriting rule can change the variable ids and each rule NEEDs to be aware of that. I wonder why not put the logic of FDs into FDsAndEquivClassesVisitor, which is the central place to keep track of FDs and equivalence classes? https://asterix-gerrit.ics.uci.edu/#/c/462/3/algebricks/algebricks-rewriter/src/main/java/org/apache/hyracks/algebricks/rewriter/rules/EnforceStructuralPropertiesRule.java File algebricks/algebricks-rewriter/src/main/java/org/apache/hyracks/algebricks/rewriter/rules/EnforceStructuralPropertiesRule.java: Line 584: PlanPrettyPrinter.printOperator(op, sb, pvisitor, 0, new HashMap<AbstractLogicalOperator, Boolean>()); Why map is needed here? The resulting states are never accessed. -- To view, visit https://asterix-gerrit.ics.uci.edu/462 To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib2036d2eac4b0a0c6ac2c2e7e1bac383b11106bd Gerrit-PatchSet: 3 Gerrit-Project: hyracks Gerrit-Branch: release-0.2.18 Gerrit-Owner: Ildar Absalyamov <[email protected]> Gerrit-Reviewer: Ian Maxon <[email protected]> Gerrit-Reviewer: Ildar Absalyamov <[email protected]> Gerrit-Reviewer: Jenkins <[email protected]> Gerrit-Reviewer: Taewoo Kim <[email protected]> Gerrit-Reviewer: Yingyi Bu <[email protected]> Gerrit-Reviewer: Young-Seok Kim <[email protected]> Gerrit-HasComments: Yes
