Skip to content

Proposal: Remove optional base from reduce and gmr #888

Closed

Description

@mlucy

We can finally do this once default (#884) is implemented.

One question that I think is worth debating: should we actually remove it, or just deprecate it and remove it from the documentation?

Activity

  1. ghost assigned on May 22, 2013
  2. wmrowan commented on Jun 6, 2013

    @wmrowan
    Contributor

    Default is now implemented. There is at least one outstanding bug (#945) related to this. I say we just do this now. Full removal. At the very least excise it from the documentation before 1.6 is released. @mlucy?

  3. mlucy commented on Jun 6, 2013

    @mlucy
    MemberAuthor

    We're really close to the 1.6 release, and I like the idea of being strict about when we discuss RQL issues. I don't think we should re-open this until the planning phase for 1.7. (I wouldn't be opposed to changing the docs to mention default instead of the base, though.)

  4. wmrowan commented on Jun 11, 2013

    @wmrowan
    Contributor

    1.7 is open. Let's remove this thing. Any objections?

  5. mlucy commented on Jun 11, 2013

    @mlucy
    MemberAuthor

    Nope.

  6. jdoliner commented on Jun 11, 2013

    @jdoliner
    Contributor

    I have a bit of a preference for not entirely removing the base on gmr. We could make it undocumented. The main reason being that if someone is using it for something it'll really suck to have them show up in IRC and ask where it's gone to and unlike with reduce we can't just tell them to use default it's actually hard to get the same meaning without a base. Admittedly this might be overly paranoid but I don't see a huge cost in leaving it around undocumented and maybe it makes someone happy.

  7. mlucy commented on Jun 11, 2013

    @mlucy
    MemberAuthor

    The cost to leaving it around undocumented is that it bitrots and makes the code more complicated.

    I think it's fairly unlikely that many (read: any) people are heavily attached to using a non-identity base with gmr in the wild; I would be happy just zapping it. (That said, there's also something to be said for undocumenting and deprecating a feature for a few releases before dropping it entirely.)

    Any thoughts, @coffeemug ?

  8. jdoliner commented on Jun 11, 2013

    @jdoliner
    Contributor

    Yeah how about for just one release? People will probably let us know if
    they're missing it by then.

    On Mon, Jun 10, 2013 at 11:56 PM, Michael Lucy [email protected]:

    The cost to leaving it around undocumented is that it bitrots and makes
    the code more complicated.

    I think it's fairly unlikely that many (read: any) people are heavily
    attached to using a non-identity base with gmr in the wild; I would be
    happy just zapping it. (That said, there's also something to be said for
    undocumenting and deprecating a feature for a few releases before dropping
    it entirely.)

    Any thoughts, @coffeemug https://github.com/coffeemug ?

    —
    Reply to this email directly or view it on GitHubhttps://github.com//issues/888#issuecomment-19245790
    .

  9. mlucy commented on Jun 11, 2013

    @mlucy
    MemberAuthor

    I'm not necessarily opposed to that, but how will people know to complain if their programs just keep working after they upgrade?

  10. coffeemug commented on Jun 11, 2013

    @coffeemug
    Contributor

    I'm of the opinion that we shouldn't overly restrict ourselves to offer a backwards compatibility API until we explicitly decide we're ready to do that. If we worry too much about backwards compatibility now, we'll be stuck with a whole bunch of issues that we could easily avoid. Our community has been very understanding of this, and I think we should try and take advantage of it whenever possible.

    For GMR, very few people are using it now (arguably because it's been poorly documented), and the people that are are experts. I don't think dropping the base will phase them, so I think we should drop it completely.

    (I also don't like the idea of leaving things undocumented -- it smells too much of "we can't decide so let's try and have our cake and eat it too")

  11. coffeemug commented on Jun 11, 2013

    @coffeemug
    Contributor

    For those reading over e-mail, "should" above was meant to be "shouldn't", which changes the meaning of the whole sentence :)

  12. mlucy commented on Jun 11, 2013

    @mlucy
    MemberAuthor

    Having slept on it, I'm in agreement with @coffeemug and @wmrowan; we should rip it out and call it good.

  13. mlucy commented on Jun 21, 2013

    @mlucy
    MemberAuthor

    Alright, this is settled: we're ripping it out.

  14. mlucy commented on Jun 21, 2013

    @mlucy
    MemberAuthor

    Note that the docs should be updated to recommend using default to handle the empty-streams case, and a corresponding test should be added.

  15. 3 remaining items

  16. mlucy commented on Sep 4, 2013

    @mlucy
    MemberAuthor

    Apparently this never happened (I realized this because Marc ran into it again today). We should really do something about this.

  17. coffeemug commented on Sep 4, 2013

    @coffeemug
    Contributor

    I didn't schedule this because I decided to wait until we redo GMR/groupBy. Given how much work we have on our plates, I think it's ok to wait here. Would that be cool?

  18. mlucy commented on Nov 27, 2013

    @mlucy
    MemberAuthor

    Moving this into 1.12. I think we should do this along with the .group.map.reduce changes currently in the pipeline for 1.12.

  19. srh commented on Nov 27, 2013

    @srh
    Contributor

    I'm confused. We're making ReQL changes before production readiness now?

  20. coffeemug commented on Nov 27, 2013

    @coffeemug
    Contributor

    We're making ReQL changes before production readiness now?

    There is a combination of reasons that makes this a good idea for 1.12, but they're mostly internal. We should talk about it in person (or shoot me an e-mail, since I won't be back until Tue).

  21. coffeemug commented on Dec 2, 2013

    @coffeemug
    Contributor

    This opens up an interesting question. Are we dropping the current GMR functionality? I think we should (while we still can).

  22. mlucy commented on Dec 2, 2013

    @mlucy
    MemberAuthor

    Yeah, gmr should go away once we have group/map/reduce.

  23. AtnNn commented on Dec 2, 2013

    @AtnNn
    Member

    @mlucy Only if the g.m.r implementation allows converting from grouped_datums to a datum.

  24. jdoliner commented on Dec 3, 2013

    @jdoliner
    Contributor

    Please only remove this from the user facing API. Maybe make it an internal flag like we have with things in the past. We need this to cleanly implement things like sum and is_empty in terms of map/reduce. Having bases will make things like sum a very simple 3 line rewrite rule that works everywhere and distributes to shards but without bases we'll have to write much more complicated code that spans several layers of the clustering stack.

    For those interested in an example sum will be implemented as:

    stream.sum(f)
    # desugars to
    stream.map(f).reduce(lambda x,y: x+y, 0)
  25. mlucy commented on Dec 5, 2013

    @mlucy
    MemberAuthor

    So, I don't think there's any server work for this if we're leaving the base in for e.g. sum.

    @Tryneus -- would you be willing to take this since it's basically just driver+doc work?

  26. Tryneus commented on Dec 5, 2013

    @Tryneus
    Member

    @mlucy, sure, taking this

  27. ghost assigned on Dec 5, 2013
  28. Tryneus commented on Jan 8, 2014

    @Tryneus
    Member

    This is implemented and up in review 1111.

  29. Tryneus commented on Jan 8, 2014

    @Tryneus
    Member

    This has been approved and merged into next in commits 0d2c06b, 94a72d6, and 46c640b. Will be in release 1.12.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions