add condtional query tests

`rows` should never be `None`; it should always be required.