db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mamta A. Satoor (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-3802) Convert "org.apache.derbyTesting.functionTests.tests.lang.optimizerOverrides.sql" to junit.
Date Mon, 11 Aug 2008 07:21:46 GMT

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

Mamta A. Satoor commented on DERBY-3802:
----------------------------------------

Junjie, I recently added(revision 681085) a new method to RuntimeStatisticsParser called usedSpecificIndexForIndexScan.
You might find that method useful to see if the expected index was picked up for a given table
or not. For instance, I noticed following 2 test cases in optimizerOverrides.sql file
1)select * from t1 --DeRbY-pRoPeRtIeS index = t1_c1
This directs the optimizer to use index = t1_c1 for table t1. You can verify this by writing
following
              RuntimeStatisticsParser rtsp = SQLUtilities.getRuntimeStatisticsParser(s);
              assertTrue(rtsp.usedSpecificIndexForIndexScan("T1","T1_C1"));
2)select * from t1 --DeRbY-pRoPeRtIeAAA index = t1_c1
This has misspelled the derby override comment and hence Derby engine is going to pick what
it thinks is best for the query which in the test appears to be T1_C1C2C3. So you can use
the new method to make sure that for T1, we are using T1_C1C2C3 
              assertTrue(rtsp.usedSpecificIndexForIndexScan("T1","T1_C1C2C3 "));


> Convert "org.apache.derbyTesting.functionTests.tests.lang.optimizerOverrides.sql" to
junit. 
> --------------------------------------------------------------------------------------------
>
>                 Key: DERBY-3802
>                 URL: https://issues.apache.org/jira/browse/DERBY-3802
>             Project: Derby
>          Issue Type: Test
>          Components: Test
>            Reporter: Junjie Peng
>            Assignee: Junjie Peng
>             Fix For: 10.1.3.2
>
>         Attachments: derby-3802-1.patch, derby-3802-2.patch, derby-3802-2.stat
>
>


-- 
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