private static AbstractDefinition generateTableDefinitionFromOnDemandQuery(OnDemandQuery onDemandQuery,
                                                                               List<Attribute> expectedOutputAttributes) {
        TableDefinition tableDefinition = TableDefinition.id(onDemandQuery.getInputStore().getStoreId());
        for (Attribute attribute : expectedOutputAttributes) {
            tableDefinition.attribute(attribute.getName(), attribute.getType());
        }
        return tableDefinition;
    }
Parse a onDemandQuery and return corresponding OnDemandQueryRuntime.

@param onDemandQuery       onDemandQuery to be parsed.
@param siddhiQueryContext associated Siddhi query context.
@param tableMap         keyvalue containing tables.
@param windowMap        keyvalue containing windows.
@param aggregationMap   keyvalue containing aggregation runtimes.
@return OnDemandQueryRuntime
modules/siddhi-core/src/main/java/io/siddhi/core/util/parser/OnDemandQueryParser.java