[ https://issues.apache.org/jira/browse/PIG-5201?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16268004#comment-16268004 ]
Koji Noguchi commented on PIG-5201: ----------------------------------- bq. Why do you have to change checkQueryOutputsAfterSort to call checkQueryOutputs? I just liked the way checkQueryOutputs showed only the different part of the outputs instead of showing the entire outputs. I tried to keep this behavior by adding extra comparisons by toString() before making sure it fails with direct comparisons. {code} + // If this tuple contains any bags, bags will be sorted before comparisons + if( !expected.equals(actual) ) { + // Using string comparisons since error message is more readable + // (only showing the part which differs) + Assert.assertEquals(expected.toString(), actual.toString()); + // if above goes through, simply failing with object comparisons + Assert.assertEquals(expected, actual); + } {code} And I didn't want to write this code twice in both checkQueryOutputs and checkQueryOutputsAfterSort. > 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, pig-5201-v09-with-testUtilchange.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)