Closed akdor1154 closed 4 years ago
Thanks! I'll blame GitHub's new notification system for missing this.
no worries haha. Added your change (thanks!), checked tests still pass, and squashed (left the overload commit separate on purpose for imo clearer history).
Thanks again!
This should fix #279 , that is, make
select(tbl, (:newname => :existing,))
work.One note is that it's now not possible to to select
:col => mapfn
when!(mapFn isa Function)
. I don't think it's possible to resolve this succinctly/with dispatch (see: https://discourse.julialang.org/t/functions-and-callable-methods/2983). A workaround for users using functors like this would beselect(tbl, (mapFn.(tbl.columns.col),))
.If the above is not acceptable, then alternatively I could special-case the selector
Pair{Symbol, Union{Symbol, Int, String, AbstractArray}}
, but this seems less general that ideal.