[
https://issues.apache.org/jira/browse/PIG-269?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12617356#action_12617356
]
Santhosh Srinivasan commented on PIG-269:
-----------------------------------------
There are no tests that use the split statement and execute the code path for
the following code:
{code}
+ LogicalOperator op = null;
try {
lp = (new LogicalPlanBuilder(pigContext).parse(scope, query,
aliases, opTable, aliasOp));
+ op = lp.getSingleLeafPlanOutputOp();
} catch (ParseException e) {
throw (IOException) new IOException(e.getMessage()).initCause(e);
}
{code}
I built the code and manually ran the following test which resulted in an
exception:
{code}
grunt> a = load '/user/sms/data/student.data' as (name, age, gpa);
grunt> split a into x if age > 19, y if age <= 19;
java.lang.AssertionError: The plan has more than one leaf node
at
org.apache.pig.impl.logicalLayer.LogicalPlan.getSingleLeafPlanOutputOp(LogicalPlan.java:42)
at org.apache.pig.PigServer.registerQuery(PigServer.java:250)
at
org.apache.pig.tools.grunt.GruntParser.processPig(GruntParser.java:425)
at
org.apache.pig.tools.pigscript.parser.PigScriptParser.parse(PigScriptParser.java:241)
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)
{code}
> Merge changes from trunk to "types" branch
> ------------------------------------------
>
> Key: PIG-269
> URL: https://issues.apache.org/jira/browse/PIG-269
> Project: Pig
> Issue Type: Sub-task
> Affects Versions: types_branch
> Reporter: Pradeep Kamath
> Assignee: Alan Gates
> Fix For: types_branch
>
> Attachments: hadoop17.patch, hadoop17_v2.patch, hadoop17_v3.patch,
> merge_main_to_types_batch1.patch, PIG-111-215-236-18-266-291.patch,
> PIG-114-118-merge.patch, PIG-123.patch, PIG-129-164.patch, PIG-172.patch,
> PIG-176-170-235-330.patch, PIG-256.patch, PIG_154_merge.patch
>
>
> A lot of changes have gone into trunk since the "types" branch was created.
> This jira issue is to track merging the changes from trunk to "types" branch.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.