Comment on purpose of query transformation
Add state to functor in query transformation test

Change functor with hard-wired test to one with configurable WHERE
condition.