[ 
https://issues.apache.org/jira/browse/DERBY-3955?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Myrna van Lunteren updated DERBY-3955:
--------------------------------------

    Attachment: DERBY-3955.diff3

Thanks Mike for the response. I did not make the test create a new database, 
but I did make the following changes:
- wrap the test in a DatabasePropertySetup decorator which 
   a. sets derby.storage.indexStats.auto to "false"
   b. sets derby.language.statementCacheSize to "0"
   and 
   c. bounces the database
This got rid of the impact from the previous test, and also of this test on 
other tests.
However there then were a few places where the estimated rowcount was different 
from before, and this was fixed by:
- adding more update_statistics calls

I think certainly in a number of these cases the estimated rowcount is indeed 
the purpose of the test, and *not* whether the expected path is taken; the test 
verifies that the optimizer calculates the same estimated rowcount with a 
number of different optimizer overrides and slightly different query 
parameters; and there seem to be very specific calculations about the expected 
rowcounts in the comments. So, while I appreciate what you were saying about 
the sensitivity for platform differences I left this as is...

If it turns out that this is indeed too fragile to maintain, then we can 
revisit.

If desired, we can add checks to ensure the correct paths are taken, using the 
org.apache.derby.junit.RuntimeStatisticsParser.

I'll commit this shortly, suites.All passed on my windows 7 system with this 
patch.

> 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.diff3, 
> 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