You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Shravan Matthur Narayanamurthy (JIRA)" <ji...@apache.org> on 2008/08/20 13:50:47 UTC

[jira] Commented: (PIG-382) bincond does not performa implicit cast of parameters

    [ https://issues.apache.org/jira/browse/PIG-382?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12623962#action_12623962 ] 

Shravan Matthur Narayanamurthy commented on PIG-382:
----------------------------------------------------

Two parts:
1) Why did it not complain earlier?
     This is also related to the GruntParser using things separately. From GruntParser we only call registerQuery which does not call execute unless it hits a store. Execute gets called directly from grunt only from processDump(). We need to do type checking inside registerQuery and not in execute if we want to see the behavior we are expecting.

2) I still need to look at the binCond issue

> bincond does not performa implicit cast of parameters
> -----------------------------------------------------
>
>                 Key: PIG-382
>                 URL: https://issues.apache.org/jira/browse/PIG-382
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: types_branch
>            Reporter: Olga Natkovich
>            Assignee: Shravan Matthur Narayanamurthy
>            Priority: Critical
>             Fix For: types_branch
>
>
> The following script
> grunt> A = load 'foo' as (name, age, gpa);
> grunt> B = foreach A generate ((name matches 'bob') ? name : '');
> grunt> dump B; 
> produces error below. Also, I am not sure why the error is not produce after just the second line. You need dump to see the error
> 2008-08-18 13:18:37,442 [main] WARN  org.apache.pig.PigServer - bytearray is implicitly casted to chararray under LORegexp Operator
> 2008-08-18 13:18:37,442 [main] ERROR org.apache.pig.PigServer - Two inputs of BinCond do not have compatible types
> 2008-08-18 13:18:37,442 [main] ERROR org.apache.pig.PigServer - Problem resolving LOForEach schema Two inputs of BinCond do not have compatible types
> 2008-08-18 13:18:37,442 [main] ERROR org.apache.pig.PigServer - Severe problem found during validation org.apache.pig.impl.plan.PlanValidationException: An unexpected exception caused the validation to stop
> 2008-08-18 13:18:37,447 [main] ERROR org.apache.pig.tools.grunt.GruntParser - java.io.IOException: Unable to open iterator for alias: B [Two inputs of BinCond do not have compatible typesProblem resolving LOForEach schema Two inputs of BinCond do not have compatible typesSevere problem found during validation org.apache.pig.impl.plan.PlanValidationException: An unexpected exception caused the validation to stop]
>         at org.apache.pig.PigServer.compileLp(PigServer.java:582)
>         at org.apache.pig.PigServer.execute(PigServer.java:516)
>         at org.apache.pig.PigServer.openIterator(PigServer.java:310)
>         at org.apache.pig.tools.grunt.GruntParser.processDump(GruntParser.java:258)
>         at org.apache.pig.tools.pigscript.parser.PigScriptParser.parse(PigScriptParser.java:175)
>         at org.apache.pig.tools.grunt.GruntParser.parseContOnError(GruntParser.java:92)
>         at org.apache.pig.tools.grunt.Grunt.run(Grunt.java:58)
>         at org.apache.pig.Main.main(Main.java:278)
> Caused by: org.apache.pig.backend.executionengine.ExecException: Two inputs of BinCond do not have compatible typesProblem resolving LOForEach schema Two inputs of BinCond do not have compatible typesSevere problem found during validation org.apache.pig.impl.plan.PlanValidationException: An unexpected exception caused the validation to stop
>         ... 8 more
> 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:549)
>         ... 7 more
> Caused by: org.apache.pig.impl.plan.VisitorException: Problem resolving LOForEach schema Two inputs of BinCond do not have compatible types
>         at org.apache.pig.impl.logicalLayer.validators.TypeCheckingVisitor.visit(TypeCheckingVisitor.java:2251)
>         at org.apache.pig.impl.logicalLayer.LOForEach.visit(LOForEach.java:88)
>         at org.apache.pig.impl.logicalLayer.LOForEach.visit(LOForEach.java:37)
>         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)

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