Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
0.2.0
-
None
-
None
-
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.
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.
Description
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)