| CPC G06F 16/24568 (2019.01) [G06F 16/2308 (2019.01); G06F 16/24542 (2019.01); G06F 16/24544 (2019.01); G06F 16/951 (2019.01)] | 19 Claims |

|
1. A computer-implemented method, comprising:
identifying, by a computer system, a query plan for a continuous query, the query plan comprising one or more physical operators, the one or more physical operators comprising respective query operator flags;
sorting, by the computer system, the query plan;
identifying, by the computer system, at least one of the physical operators of the one or more physical operators in a traversal of the sorted query plan, wherein at least one of the respective query operator flags are set to false;
for each identified physical operator of the identified one or more physical operators in the traversal of the sorted query plan:
determining, by the computer system, whether state initialization has been performed on the identified physical operator; and
in accordance with a determination that no state initialization has been performed on the identified physical operator:
constructing, by the computer system, a query string for the identified physical operator;
setting, by the computer system, the query string as an output expression for the identified physical operator;
determining, by the computer system, whether the identified physical operator is stateful; and
in accordance with a determination that the identified physical operator is stateful;
marking, by the computer system, the identified physical operator comprising a respective query operator flag as a query operator at least in part by setting the respective query operator flag to true; and
in accordance with a determination that state initialization has been performed on the identified physical operator:
marking, by the computer system, the identified physical operator comprising a respective query operator flag as a query operator at least in part by setting the respective query operator flag to true.
|