[
https://issues.apache.org/jira/browse/PIG-382?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Shravan Matthur Narayanamurthy updated PIG-382:
-----------------------------------------------
Status: Patch Available (was: Open)
Fixed the issue mentioned where implicit casts are not being inserted for
BinCond.
Also there was another bug in the parser where it did not set the type of Const
in RegExp. That is also fixed in this patch.
However, there is another issue where the typechecking happens only on dump,
which is reported in the bug. I think this is a separate bug unrelated to
BinCond. I will create a new bug for that. It needs changes to the execution
codepaths in PigServer. Will track this with the new bug.
> 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.