Till Westmann has submitted this change and it was merged. Change subject: Reduce object creation in Unnest. ......................................................................
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 <jenk...@fulliautomatix.ics.uci.edu> Tested-by: Jenkins <jenk...@fulliautomatix.ics.uci.edu> Reviewed-by: Till Westmann <ti...@apache.org> --- M hyracks-fullstack/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/UnnestRuntimeFactory.java 1 file changed, 4 insertions(+), 3 deletions(-) Approvals: Till Westmann: Looks good to me, approved Jenkins: Looks good to me, but someone else must approve; Verified 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 -- To view, visit https://asterix-gerrit.ics.uci.edu/957 To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5b2d1f281dca0655c212aad328fb737d5fec9c71 Gerrit-PatchSet: 2 Gerrit-Project: asterixdb Gerrit-Branch: master Gerrit-Owner: Yingyi Bu <buyin...@gmail.com> Gerrit-Reviewer: Jenkins <jenk...@fulliautomatix.ics.uci.edu> Gerrit-Reviewer: Till Westmann <ti...@apache.org>