You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Daniel Dai (JIRA)" <ji...@apache.org> on 2016/08/09 23:11:20 UTC
[jira] [Commented] (PIG-4968) Fix unit test failure of
TestLogicalPlanBuilder#testQuery90
[ https://issues.apache.org/jira/browse/PIG-4968?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15414418#comment-15414418 ]
Daniel Dai commented on PIG-4968:
---------------------------------
I don't think build.xml changes are related, right?
> Fix unit test failure of TestLogicalPlanBuilder#testQuery90
> ------------------------------------------------------------
>
> Key: PIG-4968
> URL: https://issues.apache.org/jira/browse/PIG-4968
> Project: Pig
> Issue Type: Bug
> Reporter: liyunzhang_intel
> Assignee: liyunzhang_intel
> Attachments: PIG-4968.patch
>
>
> In jenkins, [it |https://builds.apache.org/job/Pig-trunk/1935/#showFailuresLink] shows that TestLogicalPlanBuilder#testQuery90 fails. After debugging, it always fails in
> [Line1139 |https://github.com/apache/pig/blob/trunk/test/org/apache/pig/test/TestLogicalPlanBuilder.java#L1138]
> {code}
> Assert.assertTrue(foreach.getSchema().toString( false ).equals("mygroup:tuple(myname:chararray,myage:int),mycount:long"));
> {code}
> The script is
> {code}
> a = load 'myfile' as (name:Chararray, age:Int, gpa:Float);b = group a by (name, age);c = foreach b generate group as mygroup:(myname, myage), COUNT(a) as mycount;store c into 'output';
> {code}
>
> The reason why fails is because the schema of mygroup(myname,myage) is
> mygroup(myname:bytearray,myage:bytearray) and this user-defined schema is assigned to c. so the schema of c is
> not mygroup:tuple(myname:chararray,myage:int) but mygroup:tuple(myname:bytearray,myage:bytearray).
> This problem is imported since PIG-2315 as ForEachUserSchemaVisitor is used in [LogicalPlan|https://github.com/apache/pig/blob/trunk/src/org/apache/pig/newplan/logical/relational/LogicalPlan.java#L179].
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)