hadoop-pig-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shravan Matthur Narayanamurthy (JIRA)" <j...@apache.org>
Subject [jira] Created: (PIG-295) The testSortDistinct function in TestEvalPipeline is buggy
Date Mon, 07 Jul 2008 18:24:31 GMT
The testSortDistinct function in TestEvalPipeline is buggy
----------------------------------------------------------

                 Key: PIG-295
                 URL: https://issues.apache.org/jira/browse/PIG-295
             Project: Pig
          Issue Type: Bug
    Affects Versions: 0.0.0, types_branch
            Reporter: Shravan Matthur Narayanamurthy
            Assignee: Shravan Matthur Narayanamurthy
            Priority: Minor
             Fix For: types_branch


The problem is that last is supposed to be holding the last read value from the tuple but
clearly it does not right now as can be seen below:
              int last = -1;
		while (iter.hasNext()){
			Tuple t = iter.next();
			if (eliminateDuplicates){
				assertTrue(last < t.getAtomField(0).numval().intValue());
			}else{
				assertTrue(last <= t.getAtomField(0).numval().intValue());
				assertEquals(t.arity(), 2);
			}
		}

last is always -1 & all tests pass. This should be correct aptly for the non-types branch
if we want to. But the fix I am attaching is just for the types branch. Here since we do not
have types, there will be bytearray comparison leading to lexicographic sorting. So changed
the tests to test that rather than numeric sorting.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message