problem combining schema from a union of several LOAD expressions, with a
nested bag inside the schema.
-------------------------------------------------------------------------------------------------------
Key: PIG-730
URL: https://issues.apache.org/jira/browse/PIG-730
Project: Pig
Issue Type: Bug
Environment: pig local mode
Reporter: Christopher Olston
links = (union (load '/echo/olston/data/Echo-fetcher_first_extractedLinks-1'
using BinStorage as
(url:chararray,outlinks:{t:(target:chararray,text:chararray)})), (load
'/echo/olston/data/Echo-fetcher_first_extractedLinks-2' using BinStorage as
(url:chararray,outlinks:{t:(target:chararray,text:chararray)})));
DESCRIBE links;
gives this error:
2009-03-24 12:33:59,657 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR
1052: Cannot cast bag with schema outlinks: bag({t: (target: chararray,text:
chararray)}) to tuple with schema tuple
Details at logfile: /echo/olston/data/pig_1237923219665.log
the pig_...log file contains:
ERROR 1052: Cannot cast bag with schema outlinks: bag({t: (target:
chararray,text: chararray)}) to tuple with schema tuple
org.apache.pig.impl.logicalLayer.FrontendException: Unable to describe schema
for alias links
at org.apache.pig.PigServer.dumpSchema(PigServer.java:394)
at
org.apache.pig.tools.grunt.GruntParser.processDescribe(GruntParser.java:153)
at
org.apache.pig.tools.pigscript.parser.PigScriptParser.parse(PigScriptParser.java:188)
at
org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.java:84)
at org.apache.pig.tools.grunt.Grunt.run(Grunt.java:72)
at org.apache.pig.Main.main(Main.java:296)
Caused by: org.apache.pig.impl.plan.PlanValidationException: An unexpected
exception caused the validation to stop
at
org.apache.pig.impl.plan.PlanValidator.validateSkipCollectException(PlanValidator.java:104)
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:722)
at org.apache.pig.PigServer.dumpSchema(PigServer.java:386)
... 5 more
Caused by: org.apache.pig.impl.logicalLayer.validators.TypeCheckerException:
Problem while casting inputs of Union
at
org.apache.pig.impl.logicalLayer.validators.TypeCheckingVisitor.visit(TypeCheckingVisitor.java:2143)
at org.apache.pig.impl.logicalLayer.LOUnion.visit(LOUnion.java:113)
at org.apache.pig.impl.logicalLayer.LOUnion.visit(LOUnion.java:34)
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)
... 10 more
Caused by: org.apache.pig.impl.logicalLayer.validators.TypeCheckerException:
Cannot cast bag with schema outlinks: bag({t: (target: chararray,text:
chararray)}) to tuple with schema tuple
at
org.apache.pig.impl.logicalLayer.validators.TypeCheckingVisitor.visit(TypeCheckingVisitor.java:2034)
at org.apache.pig.impl.logicalLayer.LOCast.visit(LOCast.java:65)
at org.apache.pig.impl.logicalLayer.LOCast.visit(LOCast.java:29)
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.logicalLayer.validators.TypeCheckingVisitor.checkInnerPlan(TypeCheckingVisitor.java:2944)
at
org.apache.pig.impl.logicalLayer.validators.TypeCheckingVisitor.visit(TypeCheckingVisitor.java:2849)
at
org.apache.pig.impl.logicalLayer.validators.TypeCheckingVisitor.visit(TypeCheckingVisitor.java:2137)
... 15 more
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.