Implement fetch record concept from the '2.4. Fetch groups' in the fetch specs. (cherry picked from commit 8d38a1326e5a3cfe4ebbb0bf3d12c8307a6fbb3c)