Paginating streamsql queries, adding tests