Added Scala support for stream operations in subqueries.