|
|
-
Is GROUP order-preserving?
Todd Lee 2011-01-17, 22:14
Hi,
Is GROUP order-preserving? It is not mentioned in the Pig Latin doc while it does mention that UNION is not.
Thanks, T
-
Re: Is GROUP order-preserving?
Dmitriy Ryaboy 2011-01-17, 23:23
It is not. UNION is in relational databases (it distincts, too, which Pig does not), which is why it's specifically called out. Since in SQL you can't reach inside grouped collections, their order is arbitrary and depends on the operator implementation, so as there is no existing expectation with regards to order, it did not get called out. You can order tuples in bags returned as a result of grouping by using an ORDER operator inside a foreach loop, of course.
D
On Mon, Jan 17, 2011 at 2:14 PM, Todd Lee <[EMAIL PROTECTED]> wrote:
> Hi, > > Is GROUP order-preserving? It is not mentioned in the Pig Latin doc while > it > does mention that UNION is not. > > Thanks, > T >
-
RE: Is GROUP order-preserving?
Olga Natkovich 2011-01-18, 16:52
None of pig operations other than ORDER BY (and ORDER BY followed by LIMIT) make any order guarantees.
Olga
-----Original Message----- From: Todd Lee [mailto:[EMAIL PROTECTED]] Sent: Monday, January 17, 2011 2:14 PM To: [EMAIL PROTECTED] Subject: Is GROUP order-preserving?
Hi,
Is GROUP order-preserving? It is not mentioned in the Pig Latin doc while it does mention that UNION is not.
Thanks, T
|
|
All projects made searchable here are trademarks of the Apache Software Foundation.
Service operated by
Sematext