[ https://issues.apache.org/jira/browse/PIG-5350?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16581442#comment-16581442 ]
Igor Yagolnitser commented on PIG-5350: --------------------------------------- [~knoguchi] thanks for following up. I don't have access to pig-0.17 or trunk. Here's a more fleshed out version of the script: (you will need to create start with any dataset of any schema with just one record in it) {code:java} a = FOREACH temp GENERATE 'a' as myField, {(1,1), (2,2)} as myBag:{myTouple:(myField1:int, myField2:int)}; b = FOREACH temp GENERATE 'b' as myField, {(1,1), (2,2)} as myBag:{myTouple:(myField1:int, myField2:int)}; c = UNION a,b; d = FOREACH c { e = FILTER myBag BY myField1 == 1; GENERATE myField, FLATTEN(e); } {code} > Union of two sets with the same schema ends up with uid set to -1 > ----------------------------------------------------------------- > > Key: PIG-5350 > URL: https://issues.apache.org/jira/browse/PIG-5350 > Project: Pig > Issue Type: Bug > Environment: Pig 15 > Reporter: Igor Yagolnitser > Priority: Major > > LOAD a ... > LOAD b ... > c = UNION a, b; > d = FOREACH c { > e = FILTER d ... > GENERATE filed1, field2, FLATTEN(e.field3); > } > I get an error: ERROR org.apache.pig.tools.grunt.Grunt - ERROR 2271: Logical > plan invalid state: invalid uid -1 in schema : > field_foo#-1:tuple(field_bar#-1:double,... -- This message was sent by Atlassian JIRA (v7.6.3#76005)