Refactoring of result operator handling to support composition and improve perf.
Adds Last translation to relational query