[ 
https://issues.apache.org/jira/browse/DERBY-3955?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13877744#comment-13877744
 ] 

Myrna van Lunteren commented on DERBY-3955:
-------------------------------------------

I have not committed the patch because I ran into trouble when I ran the 
lang._Suite.

The behavior is that the expected row count for some of the test cases is 
different when run in the suite, and also, it seemed that the expanded test 
caused failures in the test OptimizerOverridesTest, even though all three tests 
use CleanDatabaseSetup.

To overcome the failures in the OptimizerOverridesTest, I changed the name of 
the table used in SelectivityTest from 'test' (which was also used in 
OptimizerOverridesTest), to 'seltest', and that seemed to do the trick for that 
issue.

I debugged the other failures to where if the test GroupByExpressionTest is run 
before the expanded SelectivityTest, there is a failure after the following 
query:
------------
        s.executeUpdate("call SYSCS_UTIL.SYSCS_SET_RUNTIMESTATISTICS(1)");
        s.executeQuery("select template.id from " +
                "--DERBY-PROPERTIES joinOrder=fixed \n" + 
                "seltest, template --DERBY-PROPERTIES joinStrategy=hash, " +
                "index=null \n" +
                "where seltest.twenty = template.twenty " +
                "and seltest.two = template.two").close();
        checkEstimatedRowCount(conn,401000.625);
----------
and in 3 other places.

I *thought* the difference in estimated rowcount might be dependent on the name 
of the table also, because GroupByExpressionsTest also used table name 'test', 
but even after the change of the table name to 'seltest; in the 
SelectivityTest, this failure still occurred. I eliminated things from the 
GroupByExpressionsTest until I get this error when the only thing happening in 
the GroupByExpressionsTest is the creation of the 3 tables 'test', 'coal', and 
'AllTypes'. If any of these 3 are eliminated, the error does not occur. 

Does anyone have a suggestion of how to prevent the earlier test from affecting 
the estimated rowcount in the later test?


> test lang/selectivity.sql can be revived
> ----------------------------------------
>
>                 Key: DERBY-3955
>                 URL: https://issues.apache.org/jira/browse/DERBY-3955
>             Project: Derby
>          Issue Type: Improvement
>          Components: Test
>            Reporter: Myrna van Lunteren
>            Priority: Minor
>         Attachments: DERBY-3955.diff1, DERBY-3955.diff2, 
> derby-3955_sanityCheck_dont_commit_diff.txt, oldSelectivity.java
>
>
> One test that was contributed during the IBM contribution of derby code was 
> not runnable at the time - lang/selectivity.sql.
> This test is still there, and I think might have some valuable regression 
> tests if it gets adapted to the current functionality in Derby.
> Ideally too, it should get converted to junit, or at least be made to run 
> through the langScripts junit suite.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to