If we were to do that second part, I'd prefer to wait on that for 6.0 and SQM. Specifically if we were to do this, I'd much rather see those lambda expressions be interpreted to SQM rather than an intermediate form (HQL, etc)