Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Plain View
Pig >> mail # user >> Maintain sort within GROUP BY?


+
Russell Jurney 2013-06-06, 18:04
+
Pradeep Gollakota 2013-06-06, 19:19
Copy link to this message
-
Re: Maintain sort within GROUP BY?
Sounds like both columns maintain their sort. Since its two fields in the
same row, whatever the sort - so long as both columns have the same sort,
all is well.
On Thu, Jun 6, 2013 at 12:19 PM, Pradeep Gollakota <[EMAIL PROTECTED]>wrote:

> I think you are looking for
>
> http://pig.apache.org/docs/r0.7.0/api/org/apache/pig/data/DataBag.html#isSorted()
>
> If I'm not mistaken, if your initially loaded bag is sorted, then they
> would still be sorted in your group. If it's not sorted, you can sort it
> first.
>
>
> On Thu, Jun 6, 2013 at 2:04 PM, Russell Jurney <[EMAIL PROTECTED]
> >wrote:
>
> > https://gist.github.com/rjurney/5723520
> >
> > My cosine similarity UDF relies on the sorts being the same at line 10.
> Can
> > I count on that?
> >
> > --
> > Russell Jurney twitter.com/rjurney [EMAIL PROTECTED]
> > datasyndrome.com
> >
>

--
Russell Jurney twitter.com/rjurney [EMAIL PROTECTED] datasyndrome.com