public Attribute[] getOnDemandQueryOutputAttributes() {
        return Arrays.copyOf(outputAttributes, outputAttributes.length);
    }
This method will return the output attributes name and its types.

@return List of output attributes
modules/siddhi-core/src/main/java/io/siddhi/core/query/OnDemandQueryRuntime.java