Equating aliases does not work (B = A)
--------------------------------------
Key: PIG-1529
URL: https://issues.apache.org/jira/browse/PIG-1529
Project: Pig
Issue Type: Improvement
Affects Versions: 0.7.0
Reporter: Viraj Bhat
I wanted to do a self-join
{code}
1 one
1 uno
2 two
2 dos
3 three
3 tres
{code}
vi...@machine~/pigscripts >pig -x local script.pig
script.pig
-- since the below does not work
{code}
A = load 'Adataset.txt' as (key:int, value:chararray);
C = join A by key, A by key;
dump C;
{code}
-- i tried the below it fails with:
{code}
A = load 'Adataset.txt' as (key:int, value:chararray);
B = A;
C = join A by key, B by key;
dump C;
{code}
2010-07-30 23:19:32,789 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR
1000: Error during parsing. Currently PIG does not support assigning an
existing relation (B) to another alias (A)
Details at logfile: /homes/viraj/pigscripts/pig_1280531249235.log
There is a workaround currently:
{code}
A = load 'Adataset.txt' as (key:int, value:chararray);
B = foreach A generate *;
C = join A by key, B by key;
dump C;
{code}
Viraj
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.