Tatyana Alexeyev created PIG-5393:
-------------------------------------

             Summary:  ERROR grunt.Grunt: ERROR 2225: Projection with nothing 
to reference!
                 Key: PIG-5393
                 URL: https://issues.apache.org/jira/browse/PIG-5393
             Project: Pig
          Issue Type: Bug
            Reporter: Tatyana Alexeyev


I got an error while running the pig SCRIPT 19/09/18 03:16:18 ERROR 
grunt.Grunt: ERROR 2225: Projection with nothing to reference! Pig Stack Trace 
--------------- ERROR 2225: Projection with nothing to reference! 
org.apache.pig.impl.logicalLayer.FrontendException: ERROR 2000: Error 
processing rule NestedLimitOptimizer. Try -t NestedLimitOptimizer at 
org.apache.pig.newplan.optimizer.PlanOptimizer.optimize([PlanOptimizer.java:125 
|planoptimizer.java:125] ) at 
org.apache.pig.newplan.logical.relational.LogicalPlan.optimize([LogicalPlan.java:281
 |logicalplan.java:281] ) at 
org.apache.pig.PigServer.executeCompiledLogicalPlan([PigServer.java:1458 
|pigserver.java:1458] ) at 
org.apache.pig.PigServer.execute([PigServer.java:1449 |pigserver.java:1449] ) 
at org.apache.pig.PigServer.executeBatch([PigServer.java:489 
|pigserver.java:489] ) at 
org.apache.pig.PigServer.executeBatch([PigServer.java:472 |pigserver.java:472] 
) at org.apache.pig.tools.grunt.GruntParser.executeBatch(G Caused by: 
org.apache.pig.impl.logicalLayer.FrontendException: ERROR 2225: Projection with 
nothing to reference! 

 

 This script runs fine on Cloudera.... However, the error happens on AWS EMR. 
The script is in the attachment I can include the data set if needed ... 

 

It caused by the following statement:

 

 

avgPriceForMkpData = FOREACH groupedSellerMkpData { orderedSellerMkpData = 
ORDER sellerMkpData BY Total_Price ASC; min2MkpPrices = LIMIT 
orderedSellerMkpData 2; GENERATE min2MkpPrices.SSIN, min2MkpPrices.Source, 
(COUNT(orderedSellerMkpData) >= 1 
?(long)ROUND(AVG(min2MkpPrices.Shipping_Cost_Deduced)*100) : 0) AS 
Shipping_Cost_Deduced, min2MkpPrices.Source_Group, (COUNT(orderedSellerMkpData) 
>= 1 ?(long)ROUND(AVG(min2MkpPrices.Total_Price)*100) : 0) AS Total_Price; 

 

Can you please help?

Tanya

 

 

 

 

 

 

 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to