You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mahout.apache.org by "Benson Margulies (JIRA)" <ji...@apache.org> on 2009/12/11 18:03:18 UTC

[jira] Created: (MAHOUT-219) Unit test for GenericSorting

Unit test for GenericSorting
----------------------------

                 Key: MAHOUT-219
                 URL: https://issues.apache.org/jira/browse/MAHOUT-219
             Project: Mahout
          Issue Type: Improvement
          Components: Matrix
    Affects Versions: 0.4
            Reporter: Benson Margulies


Just to check expectations, here is a patch with just one unit test. 


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


[jira] Commented: (MAHOUT-219) Unit test for GenericSorting

Posted by "Sean Owen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MAHOUT-219?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12789399#action_12789399 ] 

Sean Owen commented on MAHOUT-219:
----------------------------------

Looks good to me.
Dumb question but are you a committer? I forget. Just want to make sure this doesn't get hung up waiting for a commit.

> Unit test for GenericSorting
> ----------------------------
>
>                 Key: MAHOUT-219
>                 URL: https://issues.apache.org/jira/browse/MAHOUT-219
>             Project: Mahout
>          Issue Type: Improvement
>          Components: Matrix
>    Affects Versions: 0.4
>            Reporter: Benson Margulies
>         Attachments: generic-sorting-test.patch
>
>
> Just to check expectations, here is a patch with just one unit test. 

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


[jira] Resolved: (MAHOUT-219) Unit test for GenericSorting

Posted by "Sean Owen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MAHOUT-219?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sean Owen resolved MAHOUT-219.
------------------------------

       Resolution: Fixed
    Fix Version/s: 0.3
         Assignee: Benson Margulies

Committed, with style changes: Java uses "int[] foo" versus "int foo[]", and the "String(String s)" constructor is virtually always redundant.

> Unit test for GenericSorting
> ----------------------------
>
>                 Key: MAHOUT-219
>                 URL: https://issues.apache.org/jira/browse/MAHOUT-219
>             Project: Mahout
>          Issue Type: Improvement
>          Components: Matrix
>    Affects Versions: 0.4
>            Reporter: Benson Margulies
>            Assignee: Benson Margulies
>             Fix For: 0.3
>
>         Attachments: generic-sorting-test.patch
>
>
> Just to check expectations, here is a patch with just one unit test. 

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


[jira] Commented: (MAHOUT-219) Unit test for GenericSorting

Posted by "Sean Owen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MAHOUT-219?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12789404#action_12789404 ] 

Sean Owen commented on MAHOUT-219:
----------------------------------

OK well I can assist to keep your work moving. Let's pause a beat for others to comment, and if there are no objections, I'll commit your patches and can assist with future ones.

> Unit test for GenericSorting
> ----------------------------
>
>                 Key: MAHOUT-219
>                 URL: https://issues.apache.org/jira/browse/MAHOUT-219
>             Project: Mahout
>          Issue Type: Improvement
>          Components: Matrix
>    Affects Versions: 0.4
>            Reporter: Benson Margulies
>         Attachments: generic-sorting-test.patch
>
>
> Just to check expectations, here is a patch with just one unit test. 

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


[jira] Commented: (MAHOUT-219) Unit test for GenericSorting

Posted by "Benson Margulies (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MAHOUT-219?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12789503#action_12789503 ] 

Benson Margulies commented on MAHOUT-219:
-----------------------------------------

Sean,

The String constructor is NOT redundant here. It's testing stability of the sort, and it needs to have two different strings so that it can tell that they were not rearranged.

--benson'


> Unit test for GenericSorting
> ----------------------------
>
>                 Key: MAHOUT-219
>                 URL: https://issues.apache.org/jira/browse/MAHOUT-219
>             Project: Mahout
>          Issue Type: Improvement
>          Components: Matrix
>    Affects Versions: 0.4
>            Reporter: Benson Margulies
>            Assignee: Benson Margulies
>             Fix For: 0.3
>
>         Attachments: generic-sorting-test.patch
>
>
> Just to check expectations, here is a patch with just one unit test. 

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


[jira] Commented: (MAHOUT-219) Unit test for GenericSorting

Posted by "Sean Owen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MAHOUT-219?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12789655#action_12789655 ] 

Sean Owen commented on MAHOUT-219:
----------------------------------

Yeah that's where it ended up, back where it started. My bad for missing that the point was to test a stable sort. It might have been marginally better to not use String or Integer which have some special-case semantics that have to be worked around for this test to work out, but it certainly works.

> Unit test for GenericSorting
> ----------------------------
>
>                 Key: MAHOUT-219
>                 URL: https://issues.apache.org/jira/browse/MAHOUT-219
>             Project: Mahout
>          Issue Type: Improvement
>          Components: Matrix
>    Affects Versions: 0.4
>            Reporter: Benson Margulies
>            Assignee: Benson Margulies
>             Fix For: 0.3
>
>         Attachments: generic-sorting-test.patch
>
>
> Just to check expectations, here is a patch with just one unit test. 

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


[jira] Updated: (MAHOUT-219) Unit test for GenericSorting

Posted by "Benson Margulies (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MAHOUT-219?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Benson Margulies updated MAHOUT-219:
------------------------------------

    Attachment: generic-sorting-test.patch

> Unit test for GenericSorting
> ----------------------------
>
>                 Key: MAHOUT-219
>                 URL: https://issues.apache.org/jira/browse/MAHOUT-219
>             Project: Mahout
>          Issue Type: Improvement
>          Components: Matrix
>    Affects Versions: 0.4
>            Reporter: Benson Margulies
>         Attachments: generic-sorting-test.patch
>
>
> Just to check expectations, here is a patch with just one unit test. 

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


[jira] Commented: (MAHOUT-219) Unit test for GenericSorting

Posted by "Benson Margulies (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MAHOUT-219?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12789402#action_12789402 ] 

Benson Margulies commented on MAHOUT-219:
-----------------------------------------

no.

I have always depended on the kindness of strangers.

> Unit test for GenericSorting
> ----------------------------
>
>                 Key: MAHOUT-219
>                 URL: https://issues.apache.org/jira/browse/MAHOUT-219
>             Project: Mahout
>          Issue Type: Improvement
>          Components: Matrix
>    Affects Versions: 0.4
>            Reporter: Benson Margulies
>         Attachments: generic-sorting-test.patch
>
>
> Just to check expectations, here is a patch with just one unit test. 

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


[jira] Commented: (MAHOUT-219) Unit test for GenericSorting

Posted by "Benson Margulies (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MAHOUT-219?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12789663#action_12789663 ] 

Benson Margulies commented on MAHOUT-219:
-----------------------------------------

Comments would have avoided all this, I apologize. I'll add some in the next patch.



> Unit test for GenericSorting
> ----------------------------
>
>                 Key: MAHOUT-219
>                 URL: https://issues.apache.org/jira/browse/MAHOUT-219
>             Project: Mahout
>          Issue Type: Improvement
>          Components: Matrix
>    Affects Versions: 0.4
>            Reporter: Benson Margulies
>            Assignee: Benson Margulies
>             Fix For: 0.3
>
>         Attachments: generic-sorting-test.patch
>
>
> Just to check expectations, here is a patch with just one unit test. 

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


[jira] Commented: (MAHOUT-219) Unit test for GenericSorting

Posted by "Sean Owen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MAHOUT-219?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12789533#action_12789533 ] 

Sean Owen commented on MAHOUT-219:
----------------------------------

OK yeah my head's on straight now. I see that too.

> Unit test for GenericSorting
> ----------------------------
>
>                 Key: MAHOUT-219
>                 URL: https://issues.apache.org/jira/browse/MAHOUT-219
>             Project: Mahout
>          Issue Type: Improvement
>          Components: Matrix
>    Affects Versions: 0.4
>            Reporter: Benson Margulies
>            Assignee: Benson Margulies
>             Fix For: 0.3
>
>         Attachments: generic-sorting-test.patch
>
>
> Just to check expectations, here is a patch with just one unit test. 

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


[jira] Commented: (MAHOUT-219) Unit test for GenericSorting

Posted by "Drew Farris (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MAHOUT-219?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12789521#action_12789521 ] 

Drew Farris commented on MAHOUT-219:
------------------------------------

It is still not quite right in r889812 because sd[1] and sd[2] will be "==" because the non-constrictor form intern's the strings. They should not be '==' when testing a stable sort.

> Unit test for GenericSorting
> ----------------------------
>
>                 Key: MAHOUT-219
>                 URL: https://issues.apache.org/jira/browse/MAHOUT-219
>             Project: Mahout
>          Issue Type: Improvement
>          Components: Matrix
>    Affects Versions: 0.4
>            Reporter: Benson Margulies
>            Assignee: Benson Margulies
>             Fix For: 0.3
>
>         Attachments: generic-sorting-test.patch
>
>
> Just to check expectations, here is a patch with just one unit test. 

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


[jira] Commented: (MAHOUT-219) Unit test for GenericSorting

Posted by "Sean Owen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MAHOUT-219?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12789509#action_12789509 ] 

Sean Owen commented on MAHOUT-219:
----------------------------------

I made a mistake here but I think it's not quite that one. It's that the second array should be full of references to the first, not new references to the interned string literals.

> Unit test for GenericSorting
> ----------------------------
>
>                 Key: MAHOUT-219
>                 URL: https://issues.apache.org/jira/browse/MAHOUT-219
>             Project: Mahout
>          Issue Type: Improvement
>          Components: Matrix
>    Affects Versions: 0.4
>            Reporter: Benson Margulies
>            Assignee: Benson Margulies
>             Fix For: 0.3
>
>         Attachments: generic-sorting-test.patch
>
>
> Just to check expectations, here is a patch with just one unit test. 

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


[jira] Commented: (MAHOUT-219) Unit test for GenericSorting

Posted by "Benson Margulies (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MAHOUT-219?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12789652#action_12789652 ] 

Benson Margulies commented on MAHOUT-219:
-----------------------------------------

Gentlemen, I stand by the original patch. I create 5 distinct String objects. I make two arrays. I put them into the first array out of order, into the second array in order including the two that are lexically equivalent. I sort, and verify that the objects are in order. Could I persuade you to stick with my original?

> Unit test for GenericSorting
> ----------------------------
>
>                 Key: MAHOUT-219
>                 URL: https://issues.apache.org/jira/browse/MAHOUT-219
>             Project: Mahout
>          Issue Type: Improvement
>          Components: Matrix
>    Affects Versions: 0.4
>            Reporter: Benson Margulies
>            Assignee: Benson Margulies
>             Fix For: 0.3
>
>         Attachments: generic-sorting-test.patch
>
>
> Just to check expectations, here is a patch with just one unit test. 

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


[jira] Commented: (MAHOUT-219) Unit test for GenericSorting

Posted by "Sean Owen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MAHOUT-219?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12789534#action_12789534 ] 

Sean Owen commented on MAHOUT-219:
----------------------------------

... would this be easier to grok if it were using Objects? obviously I got turned around thinking about what it's doing.

> Unit test for GenericSorting
> ----------------------------
>
>                 Key: MAHOUT-219
>                 URL: https://issues.apache.org/jira/browse/MAHOUT-219
>             Project: Mahout
>          Issue Type: Improvement
>          Components: Matrix
>    Affects Versions: 0.4
>            Reporter: Benson Margulies
>            Assignee: Benson Margulies
>             Fix For: 0.3
>
>         Attachments: generic-sorting-test.patch
>
>
> Just to check expectations, here is a patch with just one unit test. 

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


[jira] Commented: (MAHOUT-219) Unit test for GenericSorting

Posted by "Ted Dunning (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MAHOUT-219?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12789437#action_12789437 ] 

Ted Dunning commented on MAHOUT-219:
------------------------------------


This looks like a fine patch (just a test and a simple one at that).

Assuming the test succeeds, of course.

Thanks and kudos to Blanche Margulies.

> Unit test for GenericSorting
> ----------------------------
>
>                 Key: MAHOUT-219
>                 URL: https://issues.apache.org/jira/browse/MAHOUT-219
>             Project: Mahout
>          Issue Type: Improvement
>          Components: Matrix
>    Affects Versions: 0.4
>            Reporter: Benson Margulies
>         Attachments: generic-sorting-test.patch
>
>
> Just to check expectations, here is a patch with just one unit test. 

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