asterixdb-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ildar Absalyamov (Code Review)" <do-not-re...@asterixdb.incubator.apache.org>
Subject Change in hyracks[release-0.2.18]: ASTERIXDB-1109: Fixed deletion of records from open secondar...
Date Fri, 06 Nov 2015 19:27:46 GMT
Ildar Absalyamov 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 ca
I have introduced state to plan printer in order to avoid printing the save parts of the plan
(happens when there are replicate operators). I guess Map is an overkill here, I'll change
it to Set instead. Set will be use to determine whether the operator was already printed or
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?
Since printOperator is a static method, the state (the set of operators, which were already
printed) should be passed in when the method is called (initially the set is empty).


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 rewriti
I agree those recordToPrimaryKey&primaryKeyRecord maps are hackish solution. I'll see
if I can avoid using them alltogether


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.
See previous explanation


-- 
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 <ildar.absalyamov@gmail.com>
Gerrit-Reviewer: Ian Maxon <imaxon@apache.org>
Gerrit-Reviewer: Ildar Absalyamov <ildar.absalyamov@gmail.com>
Gerrit-Reviewer: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Gerrit-Reviewer: Taewoo Kim <wangsaeu@gmail.com>
Gerrit-Reviewer: Yingyi Bu <buyingyi@gmail.com>
Gerrit-Reviewer: Young-Seok Kim <kisskys@gmail.com>
Gerrit-HasComments: Yes

Mime
View raw message