@Override
    public void delete(ComplexEventChunk<StateEvent> deletingEventChunk, CompiledCondition compiledCondition) {
        RecordStoreCompiledCondition recordStoreCompiledCondition =
                ((RecordStoreCompiledCondition) compiledCondition);
        List<Map<String, Object>> deleteConditionParameterMaps = new ArrayList<>();
        deletingEventChunk.reset();
        long timestamp = 0L;
        while (deletingEventChunk.hasNext()) {
            StateEvent stateEvent = deletingEventChunk.next();

            Map<String, Object> variableMap = new HashMap<>();
            for (Map.Entry<String, ExpressionExecutor> entry :
                    recordStoreCompiledCondition.variableExpressionExecutorMap.entrySet()) {
                variableMap.put(entry.getKey(), entry.getValue().execute(stateEvent));
            }

            deleteConditionParameterMaps.add(variableMap);
            timestamp = stateEvent.getTimestamp();
        }
        try {
            if (recordTableHandler != null) {
                recordTableHandler.delete(timestamp, deleteConditionParameterMaps, recordStoreCompiledCondition.
                        getCompiledCondition());
            } else {
                delete(deleteConditionParameterMaps, recordStoreCompiledCondition.getCompiledCondition());
            }
        } catch (ConnectionUnavailableException | DatabaseRuntimeException e) {
            onDeleteError(deletingEventChunk, compiledCondition, e);
        }

    }
Check if matching record exist

@param containsConditionParameterMap map of matching StreamVariable Ids and their values corresponding to the
                                     compiled condition
@param compiledCondition             the compiledCondition against which records should be matched
@return if matching record found or not
@throws ConnectionUnavailableException
modules/siddhi-core/src/main/java/io/siddhi/core/table/record/AbstractRecordTable.java