asterixdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jianf...@apache.org
Subject incubator-asterixdb-hyracks git commit: Fix the HashFunction Bug in OptimizedHybridHashJoinOperatorDescriptor
Date Sun, 14 Jun 2015 01:24:41 GMT
Repository: incubator-asterixdb-hyracks
Updated Branches:
  refs/heads/master fac0d3407 -> 9a8ab496b


Fix the HashFunction Bug in OptimizedHybridHashJoinOperatorDescriptor

The following commits from your working branch will be included:

The HashFunction used for InMemoryHashJoin is not update with level when
the OptimizedHybridHashJoin switches to InMemoryHashJoin. As the result,
it becomes the NestedLoopJoin after the 2nd round.
This patch is a fix for it.

Change-Id: Id25c85b7fadbb6bb969d0d94a51c60ac2573938e
Reviewed-on: https://asterix-gerrit.ics.uci.edu/285
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Reviewed-by: Pouria Pirzadeh <pouria.pirzadeh@gmail.com>


Project: http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-hyracks/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-hyracks/commit/9a8ab496
Tree: http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-hyracks/tree/9a8ab496
Diff: http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-hyracks/diff/9a8ab496

Branch: refs/heads/master
Commit: 9a8ab496b4367a3592347b6c132bb61c8a8ea66e
Parents: fac0d34
Author: JavierJia <jianfeng.jia@gmail.com>
Authored: Sat Jun 13 09:26:52 2015 -0700
Committer: Pouria Pirzadeh <pouria.pirzadeh@gmail.com>
Committed: Sat Jun 13 15:52:33 2015 -0700

----------------------------------------------------------------------
 .../OptimizedHybridHashJoinOperatorDescriptor.java    | 14 ++------------
 1 file changed, 2 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-hyracks/blob/9a8ab496/hyracks/hyracks-dataflow-std/src/main/java/edu/uci/ics/hyracks/dataflow/std/join/OptimizedHybridHashJoinOperatorDescriptor.java
----------------------------------------------------------------------
diff --git a/hyracks/hyracks-dataflow-std/src/main/java/edu/uci/ics/hyracks/dataflow/std/join/OptimizedHybridHashJoinOperatorDescriptor.java
b/hyracks/hyracks-dataflow-std/src/main/java/edu/uci/ics/hyracks/dataflow/std/join/OptimizedHybridHashJoinOperatorDescriptor.java
index c03f474..0494288 100644
--- a/hyracks/hyracks-dataflow-std/src/main/java/edu/uci/ics/hyracks/dataflow/std/join/OptimizedHybridHashJoinOperatorDescriptor.java
+++ b/hyracks/hyracks-dataflow-std/src/main/java/edu/uci/ics/hyracks/dataflow/std/join/OptimizedHybridHashJoinOperatorDescriptor.java
@@ -370,14 +370,6 @@ public class OptimizedHybridHashJoinOperatorDescriptor extends AbstractOperatorD
                 private BuildAndPartitionTaskState state;
                 private ByteBuffer rPartbuff = ctx.allocateFrame();
 
-                private ITuplePartitionComputerFamily hpcf0 = new FieldHashPartitionComputerFamily(probeKeys,
-                        hashFunctionGeneratorFactories);
-                private ITuplePartitionComputerFamily hpcf1 = new FieldHashPartitionComputerFamily(buildKeys,
-                        hashFunctionGeneratorFactories);
-
-                private ITuplePartitionComputer hpcRep0;
-                private ITuplePartitionComputer hpcRep1;
-
                 @Override
                 public void open() throws HyracksDataException {
                     state = (BuildAndPartitionTaskState) ctx.getStateObject(new TaskId(new
ActivityId(getOperatorId(),
@@ -404,8 +396,6 @@ public class OptimizedHybridHashJoinOperatorDescriptor extends AbstractOperatorD
                     state.hybridHJ.closeProbe(writer);
 
                     BitSet partitionStatus = state.hybridHJ.getPartitionStatus();
-                    hpcRep0 = new RepartitionComputerFamily(state.numOfPartitions, hpcf0).createPartitioner(0);
-                    hpcRep1 = new RepartitionComputerFamily(state.numOfPartitions, hpcf1).createPartitioner(0);
 
                     rPartbuff.clear();
                     for (int pid = partitionStatus.nextSetBit(0); pid >= 0; pid = partitionStatus.nextSetBit(pid
+ 1)) {
@@ -457,7 +447,7 @@ public class OptimizedHybridHashJoinOperatorDescriptor extends AbstractOperatorD
                                         "Trying to join an empty partition. Invalid table
size for inMemoryHashJoin.");
                             }
                             //Build Side is smaller
-                            applyInMemHashJoin(buildKeys, probeKeys, tabSize, probeRd, buildRd,
hpcRep0, hpcRep1,
+                            applyInMemHashJoin(buildKeys, probeKeys, tabSize, probeRd, buildRd,
probeHpc, buildHpc,
                                     buildSideReader, probeSideReader, false, pid); //checked-confirmed
                         } else { //Case 1.2 - InMemHJ with Role Reversal
                             LOGGER.fine("\t>>>Case 1.2. (NoIsLeftOuter || probe<build)
AND ApplyInMemHJ WITH RoleReversal - [Level "
@@ -469,7 +459,7 @@ public class OptimizedHybridHashJoinOperatorDescriptor extends AbstractOperatorD
                                         "Trying to join an empty partition. Invalid table
size for inMemoryHashJoin.");
                             }
                             //Probe Side is smaller
-                            applyInMemHashJoin(probeKeys, buildKeys, tabSize, buildRd, probeRd,
hpcRep1, hpcRep0,
+                            applyInMemHashJoin(probeKeys, buildKeys, tabSize, buildRd, probeRd,
buildHpc, probeHpc,
                                     probeSideReader, buildSideReader, true, pid); //checked-confirmed
                         }
                     }


Mime
View raw message