Ali Alsuliman has submitted this change and it was merged. ( https://asterix-gerrit.ics.uci.edu/3375 )
Change subject: [NO ISSUE][HYR][RT] Handle calls to close() properly in hash join ...................................................................... [NO ISSUE][HYR][RT] Handle calls to close() properly in hash join - user model changes: no - storage format changes: no - interface changes: no Details: Hash join build activity assumes that upon calling close() the join state must have been allocated in open() and therefore, it will directly call "close build" using the join state. However, if the build activity throws an exception in open(), then it could happen that the join state has not been initialized. Calling close() on the build activity will lead to a NPE since it will use the join state directly. This patch checks if the join state has been initialized. If so, it will close the build as usual. Change-Id: I41fff7deed5e56818bfefb4d36b8018a9f512cbb Reviewed-on: https://asterix-gerrit.ics.uci.edu/3375 Contrib: Jenkins <jenk...@fulliautomatix.ics.uci.edu> Tested-by: Jenkins <jenk...@fulliautomatix.ics.uci.edu> Integration-Tests: Jenkins <jenk...@fulliautomatix.ics.uci.edu> Reviewed-by: Murtadha Hubail <mhub...@apache.org> --- M hyracks-fullstack/hyracks/hyracks-dataflow-std/src/main/java/org/apache/hyracks/dataflow/std/join/OptimizedHybridHashJoinOperatorDescriptor.java 1 file changed, 9 insertions(+), 7 deletions(-) Approvals: Jenkins: Verified; ; Verified Anon. E. Moose (1000171): Murtadha Hubail: Looks good to me, approved Objections: Jenkins: Violations found diff --git a/hyracks-fullstack/hyracks/hyracks-dataflow-std/src/main/java/org/apache/hyracks/dataflow/std/join/OptimizedHybridHashJoinOperatorDescriptor.java b/hyracks-fullstack/hyracks/hyracks-dataflow-std/src/main/java/org/apache/hyracks/dataflow/std/join/OptimizedHybridHashJoinOperatorDescriptor.java index 403c492..81d08b2 100644 --- a/hyracks-fullstack/hyracks/hyracks-dataflow-std/src/main/java/org/apache/hyracks/dataflow/std/join/OptimizedHybridHashJoinOperatorDescriptor.java +++ b/hyracks-fullstack/hyracks/hyracks-dataflow-std/src/main/java/org/apache/hyracks/dataflow/std/join/OptimizedHybridHashJoinOperatorDescriptor.java @@ -315,13 +315,15 @@ @Override public void close() throws HyracksDataException { - state.hybridHJ.closeBuild(); - if (isFailed) { - state.hybridHJ.clearBuildTempFiles(); - } else { - ctx.setStateObject(state); - if (LOGGER.isTraceEnabled()) { - LOGGER.trace("OptimizedHybridHashJoin closed its build phase"); + if (state.hybridHJ != null) { + state.hybridHJ.closeBuild(); + if (isFailed) { + state.hybridHJ.clearBuildTempFiles(); + } else { + ctx.setStateObject(state); + if (LOGGER.isTraceEnabled()) { + LOGGER.trace("OptimizedHybridHashJoin closed its build phase"); + } } } } -- To view, visit https://asterix-gerrit.ics.uci.edu/3375 To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings Gerrit-Project: asterixdb Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I41fff7deed5e56818bfefb4d36b8018a9f512cbb Gerrit-Change-Number: 3375 Gerrit-PatchSet: 2 Gerrit-Owner: Ali Alsuliman <ali.al.solai...@gmail.com> Gerrit-Reviewer: Ali Alsuliman <ali.al.solai...@gmail.com> Gerrit-Reviewer: Anon. E. Moose (1000171) Gerrit-Reviewer: Jenkins <jenk...@fulliautomatix.ics.uci.edu> Gerrit-Reviewer: Murtadha Hubail <mhub...@apache.org> Gerrit-Reviewer: Till Westmann <ti...@apache.org>