>From Peeyush Gupta <[email protected]>:
Peeyush Gupta has uploaded this change for review. (
https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/18019 )
Change subject: WIP: Incorrect answer on query
......................................................................
WIP: Incorrect answer on query
Change-Id: I70c2dc64f66b95c3309b25f0b1b288ef752d9f81
---
M
hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/properties/UnorderedPartitionedProperty.java
1 file changed, 15 insertions(+), 4 deletions(-)
git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb
refs/changes/19/18019/1
diff --git
a/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/properties/UnorderedPartitionedProperty.java
b/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/properties/UnorderedPartitionedProperty.java
index fa8650c..3d52d01 100644
---
a/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/properties/UnorderedPartitionedProperty.java
+++
b/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/properties/UnorderedPartitionedProperty.java
@@ -72,11 +72,13 @@
@Override
public IPartitioningProperty substituteColumnVars(Map<LogicalVariable,
LogicalVariable> varMap) {
boolean applied = false;
- Set<LogicalVariable> newColumnSet = new ListSet<>(columnSet);
- for (Map.Entry<LogicalVariable, LogicalVariable> me :
varMap.entrySet()) {
- if (newColumnSet.remove(me.getKey())) {
- newColumnSet.add(me.getValue());
+ Set<LogicalVariable> newColumnSet = new ListSet<>();
+ for (LogicalVariable variable : columnSet) {
+ if (varMap.containsKey(variable)) {
+ newColumnSet.add(varMap.get(variable));
applied = true;
+ } else {
+ newColumnSet.add(variable);
}
}
return applied ? new UnorderedPartitionedProperty(newColumnSet,
domain) : this;
--
To view, visit https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/18019
To unsubscribe, or for help writing mail filters, visit
https://asterix-gerrit.ics.uci.edu/settings
Gerrit-Project: asterixdb
Gerrit-Branch: trinity
Gerrit-Change-Id: I70c2dc64f66b95c3309b25f0b1b288ef752d9f81
Gerrit-Change-Number: 18019
Gerrit-PatchSet: 1
Gerrit-Owner: Peeyush Gupta <[email protected]>
Gerrit-MessageType: newchange