public static void validateOutputStream(StreamDefinition outputStreamDefinition,
                                            AbstractDefinition existingStream) {
        if (!existingStream.equalsIgnoreAnnotations(outputStreamDefinition)) {
            throw new DuplicateDefinitionException("Different definition same as output '" +
                    outputStreamDefinition + "' already exist as '" + existingStream + "'",
                    outputStreamDefinition.getQueryContextStartIndex(),
                    outputStreamDefinition.getQueryContextEndIndex());
        }
    }
Utility class for queryParser to help with QueryRuntime
generation.
modules/siddhi-core/src/main/java/io/siddhi/core/util/parser/helper/DefinitionParserHelper.java