changes to expose some of the internals of queries to scwala. added new scwala translation test