asterixdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ti...@apache.org
Subject asterixdb git commit: Reduce object creation in Unnest.
Date Fri, 24 Jun 2016 10:27:10 GMT
Repository: asterixdb
Updated Branches:
  refs/heads/master cf0b05cc7 -> cf7c4526a


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>


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

Branch: refs/heads/master
Commit: cf7c4526a7898f0c961f02094a8b2efc70c6e3e7
Parents: cf0b05c
Author: Yingyi Bu <yingyi@couchbase.com>
Authored: Thu Jun 23 15:47:02 2016 -0700
Committer: Till Westmann <tillw@apache.org>
Committed: Fri Jun 24 03:26:29 2016 -0700

----------------------------------------------------------------------
 .../runtime/operators/std/UnnestRuntimeFactory.java           | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/asterixdb/blob/cf7c4526/hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/UnnestRuntimeFactory.java
----------------------------------------------------------------------
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 @@ public class UnnestRuntimeFactory extends AbstractOneInputOneOutputRuntimeFactor
         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


Mime
View raw message