FAQ
Yeah, you can use a defbufferop and index yourself inside the reducer:

(defbufferop rank [tuples]
   (map-indexed vector tuples))

I think that should do it.

Michael Drogalis wrote:
Is there a way one can do a "rank" operation in Casclaog? Just like
rank-limit, but only rank.
I want to map over some things and apply a numeric sequence to them in
the reducing phase.
--
Sam Ritchie, Twitter Inc
703.662.1337
@sritchie

--
You received this message because you are subscribed to the Google Groups "cascalog-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cascalog-user+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

  • Mike Drogalis at Jul 18, 2013 at 5:51 pm
    Perfect. Thanks man. :)

    FWIW: defbufferop isn't in the docs:
    http://nathanmarz.github.io/cascalog/index.html
    On Thursday, July 18, 2013 1:44:57 PM UTC-4, Sam Ritchie wrote:

    Yeah, you can use a defbufferop and index yourself inside the reducer:

    (defbufferop rank [tuples]
    (map-indexed vector tuples))

    I think that should do it.

    Michael Drogalis wrote:
    Is there a way one can do a "rank" operation in Casclaog? Just like
    rank-limit, but only rank.
    I want to map over some things and apply a numeric sequence to them in
    the reducing phase.
    --
    Sam Ritchie, Twitter Inc
    703.662.1337
    @sritchie
    --
    You received this message because you are subscribed to the Google Groups "cascalog-user" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to cascalog-user+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Sam Ritchie at Jul 18, 2013 at 5:53 pm
    Yeah, looks like the docs leave out anything without a doc string.

    The wiki's pretty good:
    https://github.com/nathanmarz/cascalog/wiki/Guide-to-custom-operations
    Mike Drogalis July 18, 2013 1:51 PM
    Perfect. Thanks man. :)

    FWIW: defbufferop isn't in the
    docs: http://nathanmarz.github.io/cascalog/index.html
    <http://nathanmarz.github.io/cascalog/index.html>

    On Thursday, July 18, 2013 1:44:57 PM UTC-4, Sam Ritchie wrote: --
    You received this message because you are subscribed to the Google
    Groups "cascalog-user" group.
    To unsubscribe from this group and stop receiving emails from it, send
    an email to cascalog-user+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.


    Sam Ritchie July 18, 2013 1:44 PM
    Yeah, you can use a defbufferop and index yourself inside the reducer:

    (defbufferop rank [tuples]
    (map-indexed vector tuples))

    I think that should do it.
    --
    Sam Ritchie, Twitter Inc
    703.662.1337
    @sritchie

    --
    You received this message because you are subscribed to the Google Groups "cascalog-user" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to cascalog-user+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupcascalog-user @
categoriesclojure, hadoop
postedJul 18, '13 at 5:45p
activeJul 18, '13 at 5:53p
posts3
users2
websiteclojure.org
irc#clojure

2 users in discussion

Sam Ritchie: 2 posts Mike Drogalis: 1 post

People

Translate

site design / logo © 2021 Grokbase