You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@pig.apache.org by Guy Bayes <fa...@gmail.com> on 2010/01/05 06:10:19 UTC
Complex data types as value in a map function
Is this supported?
Say I have a map
[f2#(1,6)]
I cannot figure out how to de-reference the (1,6) tuple, I either get type
conversion failure and () returned, or a 1066 error message "ERROR 1066:
Unable to open iterator for alias"
thanks
Guy
Re: Complex data types as value in a map function
Posted by Guy Bayes <fa...@gmail.com>.
thanks Thejas, that thread helped out immensely.
Also great to see Santhosh remembered that nasty PIG 880 bug with the type
inference causing an integer overflow, which coincidentally enough I also
got stung by at one time.
in the meantime, while I would love to have complex map datatypes, certainly
can be worked around using other methods
appreciate the prompt response
Guy
On Tue, Jan 5, 2010 at 10:38 AM, Thejas Nair <te...@yahoo-inc.com> wrote:
> This is an issue in PigStorage is present in recent versions of pig. Ie
> you
> cannot have complex types (bag, tuple, map) as a value in map type, if you
> are using PigStorage .
> See - https://issues.apache.org/jira/browse/PIG-1016
>
> -Thejas
>
>
> On 1/5/10 10:28 AM, "Alan Gates" <ga...@yahoo-inc.com> wrote:
>
> > It should be supported. You may need to explicitly cast it to a tuple
> > so Pig knows to treat it as a tuple. Can you send the scripts that
> > are giving the error?
> >
> > Alan.
> >
> > On Jan 4, 2010, at 9:10 PM, Guy Bayes wrote:
> >
> >> Is this supported?
> >>
> >> Say I have a map
> >>
> >> [f2#(1,6)]
> >>
> >> I cannot figure out how to de-reference the (1,6) tuple, I either
> >> get type
> >> conversion failure and () returned, or a 1066 error message "ERROR
> >> 1066:
> >> Unable to open iterator for alias"
> >>
> >> thanks
> >> Guy
> >
>
>
--
you may be acquainted with the night
but i have seen the darkness in the day
and you must know it is a terrifying sight...
Re: Complex data types as value in a map function
Posted by Thejas Nair <te...@yahoo-inc.com>.
This is an issue in PigStorage is present in recent versions of pig. Ie you
cannot have complex types (bag, tuple, map) as a value in map type, if you
are using PigStorage .
See - https://issues.apache.org/jira/browse/PIG-1016
-Thejas
On 1/5/10 10:28 AM, "Alan Gates" <ga...@yahoo-inc.com> wrote:
> It should be supported. You may need to explicitly cast it to a tuple
> so Pig knows to treat it as a tuple. Can you send the scripts that
> are giving the error?
>
> Alan.
>
> On Jan 4, 2010, at 9:10 PM, Guy Bayes wrote:
>
>> Is this supported?
>>
>> Say I have a map
>>
>> [f2#(1,6)]
>>
>> I cannot figure out how to de-reference the (1,6) tuple, I either
>> get type
>> conversion failure and () returned, or a 1066 error message "ERROR
>> 1066:
>> Unable to open iterator for alias"
>>
>> thanks
>> Guy
>
Re: Complex data types as value in a map function
Posted by Alan Gates <ga...@yahoo-inc.com>.
It should be supported. You may need to explicitly cast it to a tuple
so Pig knows to treat it as a tuple. Can you send the scripts that
are giving the error?
Alan.
On Jan 4, 2010, at 9:10 PM, Guy Bayes wrote:
> Is this supported?
>
> Say I have a map
>
> [f2#(1,6)]
>
> I cannot figure out how to de-reference the (1,6) tuple, I either
> get type
> conversion failure and () returned, or a 1066 error message "ERROR
> 1066:
> Unable to open iterator for alias"
>
> thanks
> Guy