You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Olga Natkovich (JIRA)" <ji...@apache.org> on 2011/03/04 02:43:36 UTC
[jira] Resolved: (PIG-549) type checking with order-by following
user-defined function
[ https://issues.apache.org/jira/browse/PIG-549?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Olga Natkovich resolved PIG-549.
--------------------------------
Resolution: Fixed
Fix Version/s: 0.8.0
This works fine in the latest code
> type checking with order-by following user-defined function
> -----------------------------------------------------------
>
> Key: PIG-549
> URL: https://issues.apache.org/jira/browse/PIG-549
> Project: Pig
> Issue Type: Improvement
> Affects Versions: 0.2.0
> Environment: type checker fails here:
> A = load ...;
> B = foreach A generate UDF1(*), UDF2();
> C = order B by $1;
> where UDF2() is of type EvalFunc<Integer>.
> I tried all sorts of things, including overriding outputSchema() of the UDF to specify Integer, and also adding "as x : int" to the foreach command -- in all cases I get the same error.
> Reporter: Christopher Olston
> Fix For: 0.8.0
>
>
> Exception in thread "main" java.lang.AssertionError: Unsupported root type in LOForEach:LOUserFunc
> at org.apache.pig.impl.logicalLayer.validators.TypeCheckingVisitor.visit(TypeCheckingVisitor.java:2267)
> at org.apache.pig.impl.logicalLayer.LOForEach.visit(LOForEach.java:121)
> at org.apache.pig.impl.logicalLayer.LOForEach.visit(LOForEach.java:40)
> at org.apache.pig.impl.plan.DependencyOrderWalker.walk(DependencyOrderWalker.java:68)
> at org.apache.pig.impl.plan.PlanVisitor.visit(PlanVisitor.java:51)
> at org.apache.pig.impl.plan.PlanValidator.validateSkipCollectException(PlanValidator.java:101)
> at org.apache.pig.impl.logicalLayer.validators.TypeCheckingValidator.validate(TypeCheckingValidator.java:40)
> at org.apache.pig.impl.logicalLayer.validators.TypeCheckingValidator.validate(TypeCheckingValidator.java:30)
> at org.apache.pig.impl.logicalLayer.validators.LogicalPlanValidationExecutor.validate(LogicalPlanValidationExecutor.java:79)
> at org.apache.pig.PigServer.compileLp(PigServer.java:684)
> at org.apache.pig.PigServer.compileLp(PigServer.java:655)
> at org.apache.pig.PigServer.store(PigServer.java:433)
> at org.apache.pig.PigServer.store(PigServer.java:421)
> at org.apache.pig.PigServer.openIterator(PigServer.java:384)
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira