Source:
<code>public List<List<Object>> execute() { List<Tuple2<Integer, PrestoSparkRow>> rddResults; try { rddResults = doExecute(plan); commit(session, transactionManager); } catch (RuntimeException executionFailure) { try { rollback(session, transactionManager); } catch (RuntimeException rollbackFailure) { if (executionFailure != rollbackFailure) { executionFailure.addSuppressed(rollbackFailure); } } try { queryCompletedEvent(Optional.of(executionFailure)); } catch (RuntimeException eventFailure) { <START> if (executionFailure != eventFailure) { <END> executionFailure.addSuppressed(eventFailure); } } throw executionFailure; } queryCompletedEvent(Optional.empty()); ConnectorSession connectorSession = session.toConnectorSession(); List<Type> types = plan.getFragment().getTypes(); ImmutableList.Builder<List<Object>> result = ImmutableList.builder(); for (Tuple2<Integer, PrestoSparkRow> tuple : rddResults) { PrestoSparkRow row = tuple._2; SliceInput sliceInput = new BasicSliceInput(Slices.wrappedBuffer(row.getBytes(), 0, row.getLength())); ImmutableList.Builder<Object> columns = ImmutableList.builder(); for (Type type : types) { BlockBuilder blockBuilder = type.createBlockBuilder(null, 1); blockBuilder.readPositionFrom(sliceInput); columns.add(type.getObjectValue(connectorSession.getSqlFunctionProperties(), blockBuilder, 0)); } result.add(columns.build()); } return result.build(); }</code><technical_language>wow. this if-statement effect? (an exception thrown publishing event, exception thrown publishing is *same* exception thrown execution)</technical_language>

Target:
public List<List<Object>> execute() { List<Tuple2<Integer, PrestoSparkRow>> rddResults; try { rddResults = doExecute(plan); commit(session, transactionManager); } catch (Exception executionFailure) { try { rollback(session, transactionManager); } catch (RuntimeException rollbackFailure) { log.error(rollbackFailure, "Encountered error when performing rollback"); } try { queryCompletedEvent(Optional.of(executionFailure)); } catch (RuntimeException eventFailure) { log.error(eventFailure, "Error publishing query completed event"); } if (executionFailure instanceof SparkException) { Optional<ExecutionFailureInfo> executionFailureInfo = executionExceptionFactory.tryDecode((SparkException) executionFailure); if (executionFailureInfo.isPresent()) { throw executionFailureInfo.get().toFailure(); } throw executionFailure; } if (executionFailure instanceof PrestoSparkExecutionException) { Optional<ExecutionFailureInfo> executionFailureInfo = executionExceptionFactory.tryDecode((PrestoSparkExecutionException) executionFailure); verify(executionFailureInfo.isPresent()); throw executionFailureInfo.get().toFailure(); } throw executionFailure; } queryCompletedEvent(Optional.empty()); ConnectorSession connectorSession = session.toConnectorSession(); List<Type> types = plan.getFragment().getTypes(); ImmutableList.Builder<List<Object>> result = ImmutableList.builder(); for (Tuple2<Integer, PrestoSparkRow> tuple : rddResults) { PrestoSparkRow row = tuple._2; SliceInput sliceInput = new BasicSliceInput(Slices.wrappedBuffer(row.getBytes(), 0, row.getLength())); List<Object> columns = new ArrayList<>(); for (Type type : types) { BlockBuilder blockBuilder = type.createBlockBuilder(null, 1); blockBuilder.readPositionFrom(sliceInput); columns.add(type.getObjectValue(connectorSession.getSqlFunctionProperties(), blockBuilder, 0)); } result.add(unmodifiableList(columns)); } return result.build(); }