Added test for custom sql in virtual fields.