Thanks, Jeremy. Why must it clone instead of returning self? A dataset filtered by an empty argument need not change at all, so why not just return the same dataset? Is this to uphold the expectation that filter will always return a new object, so subsequent operations do not affect the original?
Shawn On Apr 13, 3:12 am, Jeremy Evans <[email protected]> wrote: > On Apr 11, 5:18 pm, Shawn <[email protected]> wrote: > > > Also, forking in filter_expr makes this work for both ds.filter and > > ds.where. > > > Shawn > > Both filter, where, and having call _filter, so overriding it there > fixes those cases. There are a few places where filter_expr is called > directly by other code, but I'm not sure if it makes sense to try to > fix those cases. > > I did use your idea of checking for empty?, as it is a tad faster. > Thanks for that. I just pushed the commit to > github:http://github.com/jeremyevans/sequel/commit/27154a5f53b29bf2075da6809... > > Jeremy -- You received this message because you are subscribed to the Google Groups "sequel-talk" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/sequel-talk?hl=en.
