pig-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jonathan Coveney <jcove...@gmail.com>
Subject Re: Another possible unknown bug with foreach?
Date Fri, 11 Nov 2011 09:03:04 GMT
yessir

https://issues.apache.org/jira/browse/PIG-2357

2011/11/11 Daniel Dai <daijy@hortonworks.com>

> explain show the right plan, but describe wrong. Please open a ticket.
>
> Daniel
>
> On Thu, Nov 10, 2011 at 8:27 PM, Jonathan Coveney <jcoveney@gmail.com
> >wrote:
>
> > This one is really whacky, just wondering if this is a known issue? I've
> > noted the difference
> >
> > a = load 'thing' as (v0,v1,v2);
> >
> > b = GROUP a BY v0;
> >
> > c = FOREACH b {
> >
> >   ordered = ORDER a BY v1 ASC;
> >
> >   t1 = LIMIT ordered 3;
> >
> >   ordered2 = ORDER a BY v1 DESC, v2 ASC;
> >
> >   t2 = LIMIT ordered 3; --references ordered
> >
> >   GENERATE group, t1.v2 as x2, t2.v2 as x4;
> >
> > }
> >
> > describe c;
> >
> >
> > --returns: c: {v0: bytearray,v1: bytearray,v2: bytearray}
> >
> > a = load 'thing' as (v0,v1,v2);
> >
> > b = GROUP a BY v0;
> >
> > c = FOREACH b {
> >
> >   ordered = ORDER a BY v1 ASC;
> >
> >   t1 = LIMIT ordered 3;
> >
> >   ordered2 = ORDER a BY v1 DESC, v2 ASC;
> >
> >   t2 = LIMIT ordered2 3; --references ordered2
> >
> >   GENERATE group, t1.v2 as x2, t2.v2 as x4;
> >
> > }
> >
> > describe c;
> >
> > returns: c: {group: bytearray,x2: {(v2: bytearray)},x4: {(v2:
> bytearray)}}
> >
> > The latter is the correct one, but the former shouldn't return the schema
> > of b (which is what it does: I ran into this bug oddly because the script
> > had a bug where it referred to the wrong relation, but it shouldn't
> return
> > the schema of b!)
> >
> > Should I make a ticket?
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message