Using state modules for adaptive query processing | Synapse