You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Andrew McIntyre (JIRA)" <ji...@apache.org> on 2007/03/27 08:46:32 UTC

[jira] Created: (DERBY-2491) Convert distinct.sql to JUnit

Convert distinct.sql to JUnit
-----------------------------

                 Key: DERBY-2491
                 URL: https://issues.apache.org/jira/browse/DERBY-2491
             Project: Derby
          Issue Type: Test
          Components: Test
            Reporter: Andrew McIntyre
         Assigned To: Andrew McIntyre
            Priority: Minor




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


[jira] Updated: (DERBY-2491) Convert distinct.sql to JUnit

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

Andrew McIntyre updated DERBY-2491:
-----------------------------------

    Attachment: derby-2491-v1.stat

Stat file

> Convert distinct.sql to JUnit
> -----------------------------
>
>                 Key: DERBY-2491
>                 URL: https://issues.apache.org/jira/browse/DERBY-2491
>             Project: Derby
>          Issue Type: Test
>          Components: Test
>            Reporter: Andrew McIntyre
>         Assigned To: Andrew McIntyre
>            Priority: Minor
>         Attachments: derby-2491-pre.diff, derby-2491-v1.diff, derby-2491-v1.stat
>
>


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


[jira] Updated: (DERBY-2491) Convert distinct.sql to JUnit

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

Andrew McIntyre updated DERBY-2491:
-----------------------------------

    Attachment: derby-2491-v1.diff

Accidentally redirected stat output over my diff file, attaching the correct diff here.

> Convert distinct.sql to JUnit
> -----------------------------
>
>                 Key: DERBY-2491
>                 URL: https://issues.apache.org/jira/browse/DERBY-2491
>             Project: Derby
>          Issue Type: Test
>          Components: Test
>            Reporter: Andrew McIntyre
>         Assigned To: Andrew McIntyre
>            Priority: Minor
>         Attachments: derby-2491-pre.diff, derby-2491-v1.diff, derby-2491-v1.stat
>
>


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


[jira] Updated: (DERBY-2491) Convert distinct.sql to JUnit

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

Andrew McIntyre updated DERBY-2491:
-----------------------------------

    Attachment:     (was: derby-2491-v1.diff)

> Convert distinct.sql to JUnit
> -----------------------------
>
>                 Key: DERBY-2491
>                 URL: https://issues.apache.org/jira/browse/DERBY-2491
>             Project: Derby
>          Issue Type: Test
>          Components: Test
>            Reporter: Andrew McIntyre
>         Assigned To: Andrew McIntyre
>            Priority: Minor
>         Attachments: derby-2491-pre.diff, derby-2491-v1.diff, derby-2491-v1.stat
>
>


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


[jira] Closed: (DERBY-2491) Convert distinct.sql to JUnit

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

Andrew McIntyre closed DERBY-2491.
----------------------------------

       Resolution: Fixed
    Fix Version/s: 10.3.0.0

Committed new test to repository with revision 523546, closing.

> Convert distinct.sql to JUnit
> -----------------------------
>
>                 Key: DERBY-2491
>                 URL: https://issues.apache.org/jira/browse/DERBY-2491
>             Project: Derby
>          Issue Type: Test
>          Components: Test
>            Reporter: Andrew McIntyre
>         Assigned To: Andrew McIntyre
>            Priority: Minor
>             Fix For: 10.3.0.0
>
>         Attachments: derby-2491-pre.diff, derby-2491-v1.diff, derby-2491-v1.stat
>
>


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


[jira] Commented: (DERBY-2491) Convert distinct.sql to JUnit

Posted by "Andrew McIntyre (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-2491?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12484926 ] 

Andrew McIntyre commented on DERBY-2491:
----------------------------------------

Whoops! Meant to attach my response to the review comments to this issue, but accidentally ended up attaching them to DERBY-2493. Please see the comments in that issue if interested.

> Convert distinct.sql to JUnit
> -----------------------------
>
>                 Key: DERBY-2491
>                 URL: https://issues.apache.org/jira/browse/DERBY-2491
>             Project: Derby
>          Issue Type: Test
>          Components: Test
>            Reporter: Andrew McIntyre
>         Assigned To: Andrew McIntyre
>            Priority: Minor
>         Attachments: derby-2491-pre.diff, derby-2491-v1.diff, derby-2491-v1.stat
>
>


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


[jira] Commented: (DERBY-2491) Convert distinct.sql to JUnit

Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-2491?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12485111 ] 

Knut Anders Hatlen commented on DERBY-2491:
-------------------------------------------

Thanks for your comments, Andrew! I agree that the redundancy of the queries gives us the needed confidence. As to the ordering of the results, I have just committed a new assert method (assertUnorderedResultSet) as part of DERBY-2493. It takes the same parameters as assertFullResultSet and ignores the order of the results. I also updated one of the test cases in DistinctTest that would have failed because of DERBY-2493.

> Convert distinct.sql to JUnit
> -----------------------------
>
>                 Key: DERBY-2491
>                 URL: https://issues.apache.org/jira/browse/DERBY-2491
>             Project: Derby
>          Issue Type: Test
>          Components: Test
>            Reporter: Andrew McIntyre
>         Assigned To: Andrew McIntyre
>            Priority: Minor
>             Fix For: 10.3.0.0
>
>         Attachments: derby-2491-pre.diff, derby-2491-v1.diff, derby-2491-v1.stat
>
>


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


[jira] Commented: (DERBY-2491) Convert distinct.sql to JUnit

Posted by "Andrew McIntyre (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-2491?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12484650 ] 

Andrew McIntyre commented on DERBY-2491:
----------------------------------------

Will include distinctElimination and distinctFiltering in this conversion.

> Convert distinct.sql to JUnit
> -----------------------------
>
>                 Key: DERBY-2491
>                 URL: https://issues.apache.org/jira/browse/DERBY-2491
>             Project: Derby
>          Issue Type: Test
>          Components: Test
>            Reporter: Andrew McIntyre
>         Assigned To: Andrew McIntyre
>            Priority: Minor
>         Attachments: derby-2491-pre.diff
>
>


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


[jira] Updated: (DERBY-2491) Convert distinct.sql to JUnit

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

Andrew McIntyre updated DERBY-2491:
-----------------------------------

    Attachment: derby-2491-v1.diff

Attaching converted test for this issue, note that one testcase for group by that somehow ended up in distinct.sql was moved over to a new GroupByTest. Please review, if there are no comments, I'll commit this tomorrow morning after adding a few more javadoc comments.

> Convert distinct.sql to JUnit
> -----------------------------
>
>                 Key: DERBY-2491
>                 URL: https://issues.apache.org/jira/browse/DERBY-2491
>             Project: Derby
>          Issue Type: Test
>          Components: Test
>            Reporter: Andrew McIntyre
>         Assigned To: Andrew McIntyre
>            Priority: Minor
>         Attachments: derby-2491-pre.diff, derby-2491-v1.diff, derby-2491-v1.stat
>
>


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


[jira] Commented: (DERBY-2491) Convert distinct.sql to JUnit

Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-2491?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12484868 ] 

Knut Anders Hatlen commented on DERBY-2491:
-------------------------------------------

If I have read the patch correctly, DistinctTest.checkDistinctRows only tests that the queries return the correct number of rows. Are we confident that the other aspects of SELECT DISTINCT (for instance that the returned values in fact are distinct and the ones we expect) are tested well enough by other tests?

What I do like about the approach is that the test doesn't fail if the order of the rows changes, since I am planning to post a patch for DERBY-2493 which will change the order. :)

Some tiny nits:
 - checkDistinctRows() could be private, I think
 - in checkDistinctRows(), "if (rowcounts.length != 37) fail(...)" could be changed to assertEquals
 - in javadoc for RuntimeStatisticsParser.indexOf(): "founf" -> "found"

> Convert distinct.sql to JUnit
> -----------------------------
>
>                 Key: DERBY-2491
>                 URL: https://issues.apache.org/jira/browse/DERBY-2491
>             Project: Derby
>          Issue Type: Test
>          Components: Test
>            Reporter: Andrew McIntyre
>         Assigned To: Andrew McIntyre
>            Priority: Minor
>         Attachments: derby-2491-pre.diff, derby-2491-v1.diff, derby-2491-v1.stat
>
>


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


[jira] Updated: (DERBY-2491) Convert distinct.sql to JUnit

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

Andrew McIntyre updated DERBY-2491:
-----------------------------------

    Attachment: derby-2491-pre.diff

Attaching a preliminary patch for this issue. This converts all of the testcases that utilize the distinct.subsql script, which accounts for about 75% of the test. I'll follow up with the remaining testcases tomorrow. If anyone has any suggestions on how to improve the test so that it is more readable / debuggable, please let me know.

> Convert distinct.sql to JUnit
> -----------------------------
>
>                 Key: DERBY-2491
>                 URL: https://issues.apache.org/jira/browse/DERBY-2491
>             Project: Derby
>          Issue Type: Test
>          Components: Test
>            Reporter: Andrew McIntyre
>         Assigned To: Andrew McIntyre
>            Priority: Minor
>         Attachments: derby-2491-pre.diff
>
>


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