hadoop-pig-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shravan Matthur Narayanamurthy (JIRA)" <j...@apache.org>
Subject [jira] Created: (PIG-456) Unable to resolve column names
Date Wed, 24 Sep 2008 12:52:44 GMT
Unable to resolve column names
------------------------------

                 Key: PIG-456
                 URL: https://issues.apache.org/jira/browse/PIG-456
             Project: Pig
          Issue Type: Bug
          Components: impl
    Affects Versions: types_branch
            Reporter: Shravan Matthur Narayanamurthy


Fact = load 'myfact.txt' using PigStorage(',') as (date_sid,f_mrkt_sid,f_prd_sid,revenue,impr,clicks,col2,col3);
Market = load 'dim_com_market.txt' using PigStorage(',') as (mrkt_sid,mrkt_id,market_name);
Product = load 'dim_com_product.txt' using PigStorage(',') as (prd_sid,prd_id,product_name);
Join1 = JOIN Fact by f_mrkt_sid, Market by mrkt_sid;
Join2 = JOIN Join1 by f_prd_sid, Product by prd_sid;
TStore = foreach Join2 Generate product_name,market_name, impr, clicks;
Grouped = group TStore by (market_name,product_name);
Metric = foreach Grouped  generate flatten(group),SUM(TStore.impr) as m1,SUM(TStore.clicks)
as m2;
Result = Foreach Metric Generate market_name, product_name, m1, m2;
Store Result into 'myresults_ja.txt' using PigStorage(',') ;

The above script fails wtih the following trace:

2008-09-24 17:47:30,461 [main] ERROR org.apache.pig.tools.grunt.GruntParser - java.io.IOException:
Found more than one match: Market::market_name, Join1::Market::market_name
	at org.apache.pig.PigServer.parseQuery(PigServer.java:293)
	at org.apache.pig.PigServer.registerQuery(PigServer.java:258)
	at org.apache.pig.tools.grunt.GruntParser.processPig(GruntParser.java:432)
	at org.apache.pig.tools.pigscript.parser.PigScriptParser.parse(PigScriptParser.java:242)
	at org.apache.pig.tools.grunt.GruntParser.parseContOnError(GruntParser.java:93)
	at org.apache.pig.tools.grunt.Grunt.run(Grunt.java:58)
	at org.apache.pig.Main.main(Main.java:282)
Caused by: org.apache.pig.impl.logicalLayer.parser.ParseException: Found more than one match:
Market::market_name, Join1::Market::market_name
	at org.apache.pig.impl.logicalLayer.parser.QueryParser.AliasFieldOrSpec(QueryParser.java:5854)
	at org.apache.pig.impl.logicalLayer.parser.QueryParser.ColOrSpec(QueryParser.java:5709)
	at org.apache.pig.impl.logicalLayer.parser.QueryParser.BaseEvalSpec(QueryParser.java:4012)
	at org.apache.pig.impl.logicalLayer.parser.QueryParser.UnaryExpr(QueryParser.java:3909)
	at org.apache.pig.impl.logicalLayer.parser.QueryParser.CastExpr(QueryParser.java:3863)
	at org.apache.pig.impl.logicalLayer.parser.QueryParser.MultiplicativeExpr(QueryParser.java:3772)
	at org.apache.pig.impl.logicalLayer.parser.QueryParser.AdditiveExpr(QueryParser.java:3698)
	at org.apache.pig.impl.logicalLayer.parser.QueryParser.InfixExpr(QueryParser.java:3664)
	at org.apache.pig.impl.logicalLayer.parser.QueryParser.FlattenedGenerateItem(QueryParser.java:3590)
	at org.apache.pig.impl.logicalLayer.parser.QueryParser.FlattenedGenerateItemList(QueryParser.java:3513)
	at org.apache.pig.impl.logicalLayer.parser.QueryParser.GenerateStatement(QueryParser.java:3457)
	at org.apache.pig.impl.logicalLayer.parser.QueryParser.NestedBlock(QueryParser.java:2933)
	at org.apache.pig.impl.logicalLayer.parser.QueryParser.ForEachClause(QueryParser.java:2336)
	at org.apache.pig.impl.logicalLayer.parser.QueryParser.BaseExpr(QueryParser.java:973)
	at org.apache.pig.impl.logicalLayer.parser.QueryParser.Expr(QueryParser.java:748)
	at org.apache.pig.impl.logicalLayer.parser.QueryParser.Parse(QueryParser.java:549)
	at org.apache.pig.impl.logicalLayer.LogicalPlanBuilder.parse(LogicalPlanBuilder.java:60)
	at org.apache.pig.PigServer.parseQuery(PigServer.java:290)
	... 6 more

2008-09-24 17:47:30,461 [main] ERROR org.apache.pig.tools.grunt.GruntParser - Found more than
one match: Market::market_name, Join1::Market::market_name
2008-09-24 17:47:30,461 [main] ERROR org.apache.pig.tools.grunt.GruntParser - java.io.IOException:
Found more than one match: Market::market_name, Join1::Market::market_name

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message