@Override
    public OutputStream visitStore_query_output(@NotNull SiddhiQLParser.Store_query_outputContext ctx) {
        //  :DELETE target ON expression
        //  |UPDATE target set_clause? ON expression
        //  ;

        if (ctx.DELETE() != null) {
            Source source = (Source) visit(ctx.target());
            if (source.isInnerStream || source.isFaultStream) {
                throw newSiddhiParserException(ctx, "DELETE can be only used with Tables!");
            }
            Expression expression = null;
            if (ctx.expression() != null) {
                expression = (Expression) visit(ctx.expression());
            }
            OutputStream outputStream = new DeleteStream(source.streamId, expression);
            populateQueryContext(outputStream, ctx);
            return outputStream;
        } else if (ctx.UPDATE() != null) {
            Source source = (Source) visit(ctx.target());
            if (source.isInnerStream || source.isFaultStream) {
                throw newSiddhiParserException(ctx, "DELETE can be only used with Tables!");
            }
            if (ctx.set_clause() != null) {
                OutputStream outputStream = new UpdateStream(source.streamId, (UpdateSet) visit(ctx.set_clause()),
                        (Expression) visit(ctx.expression()));
                populateQueryContext(outputStream, ctx);
                return outputStream;
            } else {
                OutputStream outputStream = new UpdateStream(source.streamId, (Expression) visit(ctx.expression()));
                populateQueryContext(outputStream, ctx);
                return outputStream;
            }
        } else {
            throw newSiddhiParserException(ctx);
        }
    }
{@inheritDoc}
<p>
<p>The default implementation returns the result of calling
{@link #visitChildren} on {@code ctx}.</p>
modules/siddhi-query-compiler/src/main/java/io/siddhi/query/compiler/internal/SiddhiQLBaseVisitorImpl.java