Back porting `data.select()` from `pre-4.0` branch

Minor fix
Merge pull request #444 from avoidwork/edge

Major refactoring