commit | cf7c4526a7898f0c961f02094a8b2efc70c6e3e7 | [log] [tgz] |
---|---|---|
author | Yingyi Bu <yingyi@couchbase.com> | Thu Jun 23 15:47:02 2016 -0700 |
committer | Till Westmann <tillw@apache.org> | Fri Jun 24 03:26:29 2016 -0700 |
tree | 3f97f9fe974dc90b4ebe6349e477be1962bbe5a4 | |
parent | cf0b05cc79590049c5a3470369516e71da1424be [diff] |
Reduce object creation in Unnest. If an Unnest is run in a Subplan operator, open/close need to be called many times. Change-Id: I5b2d1f281dca0655c212aad328fb737d5fec9c71 Reviewed-on: https://asterix-gerrit.ics.uci.edu/957 Reviewed-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu> Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu> Reviewed-by: Till Westmann <tillw@apache.org>
diff --git a/hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/UnnestRuntimeFactory.java b/hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/UnnestRuntimeFactory.java index 3afa808..300be34 100644 --- a/hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/UnnestRuntimeFactory.java +++ b/hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/UnnestRuntimeFactory.java
@@ -94,14 +94,15 @@ int missingBytesLen = bos.size(); return new AbstractOneInputOneOutputOneFramePushRuntime() { private IPointable p = VoidPointable.FACTORY.createPointable(); - private ArrayTupleBuilder tupleBuilder; + private ArrayTupleBuilder tupleBuilder = new ArrayTupleBuilder(projectionList.length); private IUnnestingEvaluator unnest = unnestingFactory.createUnnestingEvaluator(ctx); @Override public void open() throws HyracksDataException { writer.open(); - initAccessAppendRef(ctx); - tupleBuilder = new ArrayTupleBuilder(projectionList.length); + if (tRef == null) { + initAccessAppendRef(ctx); + } } @Override