Fix the ExternalGroupby for fuzzy join

Change-Id: I5a3852d08f9a3e2738ea2952f05aa082a2e6dbbb
Reviewed-on: https://asterix-gerrit.ics.uci.edu/713
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Reviewed-by: Yingyi Bu <buyingyi@gmail.com>
diff --git a/hyracks/hyracks-dataflow-std/src/main/java/org/apache/hyracks/dataflow/std/group/HashSpillableTableFactory.java b/hyracks/hyracks-dataflow-std/src/main/java/org/apache/hyracks/dataflow/std/group/HashSpillableTableFactory.java
index 44ddf44..e08041d 100644
--- a/hyracks/hyracks-dataflow-std/src/main/java/org/apache/hyracks/dataflow/std/group/HashSpillableTableFactory.java
+++ b/hyracks/hyracks-dataflow-std/src/main/java/org/apache/hyracks/dataflow/std/group/HashSpillableTableFactory.java
@@ -83,12 +83,7 @@
 
         final AggregateState aggregateState = aggregator.createAggregateStates();
 
-        final ArrayTupleBuilder stateTupleBuilder;
-        if (keyFields.length < outRecordDescriptor.getFields().length) {
-            stateTupleBuilder = new ArrayTupleBuilder(outRecordDescriptor.getFields().length);
-        } else {
-            stateTupleBuilder = new ArrayTupleBuilder(outRecordDescriptor.getFields().length + 1);
-        }
+        final ArrayTupleBuilder stateTupleBuilder = new ArrayTupleBuilder(outRecordDescriptor.getFields().length);
 
         //TODO(jf) research on the optimized partition size
         final int numPartitions = getNumOfPartitions((int) (dataBytesSize / ctx.getInitialFrameSize()),