[ https://issues.apache.org/jira/browse/PIG-5201?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Koji Noguchi updated PIG-5201: ------------------------------ Attachment: pig-5201-v08.patch Sorry for taking this long to commit. Two more issues. (a) My last patch has one test failure from the test I added at {{org.apache.pig.test.TestFlatten.testFlattenOnNullMap}} {panel} Comparing actual and expected results. expected: java.util.ArrayList<\[(,,11,12), (,,13,14), (a,b,1,2), (a,b,3,4), (c,d,1,2), (c,d,3,4), (k,l,,), (m,n,,)]> but was: java.util.ArrayList<\[(,,11,12), (,,13,14), (a,b,1,2), (a,b,3,4), (c,d,1,2), (c,d,3,4), (k,l,,), (m,n,,)]> {panel} Above error message is showing identical strings but it's actually failing since {{Util.checkQueryOutputs}} only compares the string representation but {{Util.checkQueryOutputsAfterSort}} actually compares Object to Object and is more strict. Above test is failing since one has null and another has empty string. This patch fixed the test case so that it correctly passes "null" instead of empty "" as the expected outputs. We can go one step further and make checkQueryOutputs and checkQueryOutputsAfterSort consistent but this requires more changes elsewhere. (b) {{org.apache.pig.test.TestProjectRange.testRangeOrderByMixNOSchema}} and {{org.apache.pig.test.TestProjectRange.testRangeOrderByStartNOSchema}} fails with my previous patch when comparing with the golden file. Looking at them, it seems like golden files for these two tests include the serialized class as the output (and my patch did add extra field in POForEach. For now, replaced the golden files but we may want to see if we can get rid of that serialized output line. > Null handling on FLATTEN > ------------------------ > > Key: PIG-5201 > URL: https://issues.apache.org/jira/browse/PIG-5201 > Project: Pig > Issue Type: Bug > Reporter: Koji Noguchi > Assignee: Koji Noguchi > Fix For: 0.18.0 > > Attachments: pig-5201-v00-testonly.patch, pig-5201-v01.patch, > pig-5201-v02.patch, pig-5201-v03.patch, pig-5201-v04.patch, > pig-5201-v05.patch, pig-5201-v06.patch, pig-5201-v07.patch, pig-5201-v08.patch > > > Sometimes, FLATTEN(null) or FLATTEN(bag-with-null) seem to produce incorrect > results. > Test code/script to follow. -- This message was sent by Atlassian JIRA (v6.4.14#64029)