fix rest query executor to handle where and emit send by query engine