JuliaData / IndexedTables.jl

Flexible tables with ordered indices
https://juliadb.org
MIT License
121 stars 37 forks source link

Support colon selectors to select everything #282

Open piever opened 3 years ago

piever commented 3 years ago

At the moment we use select(t, All()) to select everything, and select(t, All(args...)) to select the union of the selectors in args. This is a bit inconsistent, as the empty union is empty, which is not what All() does.

The fix recommended in https://github.com/JuliaData/DataAPI.jl/issues/27 is use : to mean everything, and to replace All(args...) with Cols(args...), which now always means the union. Thus, IIUC, as selectors, Cols(:) == : == All().

This issue is to see whether there are concerns about supporting : as a selector to replace All(). My only concern is that select(t, :) and select(t, 1:3) would do very different things (the latter returns 1:3), but it is IMO not a deal breaker.