Adding support for partial results by exposing the listener to the end
Modifying SQL collect to support partial results