[
https://issues.apache.org/jira/browse/DERBY-2249?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12473760
]
A B commented on DERBY-2249:
----------------------------
I don't how (or if?) the discussion of where to put the new test and of what to
call it ended, but in any event I was able to build it with the build.xml file
(after removing the references to "mailjdbc" and "sttest" from
DERBY-2249_diff.txt) so thank you for providing it. I then started playing
around with the test and my initial comments are below.
** 1) In an attempt to get the test to run quickly just so I could see what it
does, I changed the values in StaticValues.java to the following:
public static int NUM_OF_ROWS=100; //Total number of rows expected in each
table
public static int NUM_OF_TABLES=8; //Total number of tables to be created
public static int ITER=3; //Number of iterations of each query
When I then tried to run the test, I saw several failures (see below). Are
there any restrictions on what these values can or should be? When I specified
them as shown above I saw the following errors:
1) While creating views:
SQLState = 42X05, java.sql.SQLException: Table/View 'MYTABLE16' does not
exist. (x2)
SQLState = 42X05, java.sql.SQLException: Table/View 'MYTABLE32' does not
exist. (x4)
SQLState = 42X05, java.sql.SQLException: Table/View 'MYTABLE9' does not
exist.
SQLState = 42X05, java.sql.SQLException: Table/View 'MYTABLE11' does not
exist.
SQLState = 42X05, java.sql.SQLException: Table/View 'MYTABLE13' does not
exist.
SQLState = 42X05, java.sql.SQLException: Table/View 'MYTABLE15' does not
exist.
2) While running query "Select from single view":
SQLState= 42X05
ErrorCode= 30000
Message= Table/View 'V16' does not exist.
3) While printing results:
QueryName Using PreparedStatment Using Statement Rows Expected
------------------------------------------------------------------------------
Exception in thread "main" java.lang.IndexOutOfBoundsException: Index: 0,
Size: 0
at java.util.ArrayList.RangeCheck(ArrayList.java(Inlined Compiled Code))
at java.util.ArrayList.get(ArrayList.java(Compiled Code))
at
org.apache.derbyTesting.system.langtest.RunLangTest.printResults(RunLangTest.java:141)
at
org.apache.derbyTesting.system.langtest.RunLangTest.main(RunLangTest.java:121)
I tried increasing the number of tables to 32 but I still saw the same errors
(just with different table/view names). I then put it back to 64 (the default)
and the test ran to completion.
** 2) The "R E S U L T S" output at the end of the test is very nice. While
the test is running, though, a lot of info is printed to the screen, including
the queries themselves. All of that info (esp. the queries themselves) is a
bit overwhelming (to me, at least ;) I wonder if it might be better to just use
query numbers like we do in the results? Or else completely disable the
in-progress output and just print the results at the end, since that has all of
the relevant information? Perhaps we could add a test parameter that allows for
echoing of the query text if the user chooses ("verbose")? Certainly not a
requirement, though; just a "wish" item.
** 3) It was not clear to me from the README that specification of "-qlist"
means that the test will search for a file named 'query.list' in the *current*
directory (I thought I was supposed to pass the path to query.list in as an
argument). It also was not clear to me that if I did *not* specify "-qlist"
the test would _still_ search for a file named 'query.list' in the current
directory, with the apparent intent of running the default queries AND the
queries in 'query.list'. Is that correct?
** 4) Is there more info available about what is expected in the "query.list"
file if one is specified? I tried creating a query.list file that had a couple
of queries pulled from "Query2.java" but the result was a failure with a syntax
error (it looks like maybe the "select" keyword is being stripped?). I tried
putting quotes around the query but that didn't help. Also, if we want to
specify more than one query in 'query.list', what's the delimiter? Is that even
possible? I think it would be good if all of the relevant information about
'query.list' could be included in the README file.
** 5) I think it would be great if more comments could be added to the various
queries in the QueryX.java files. For example, I opened up Query2.java and
thought all of the queries were the same. Only after staring at them for a
while did I realize that there were identical *except* for the views that they
use (v8 vs v16 vs v32, etc). A comment to that effect might save people who
look at the queries some time. Similarly for utils/TestViews.java (ex. what's
the difference between "v8" and "v8_2"?)
Note that since this new test is not going to run as part of derbyall nor as
part of suites.All, it seems reasonable to commit the new files (once we decide
where to put them) as they are and then to address the issues described below
as follow-up patches. After all, "progress not perfection" is the goal here,
with the underlying assumption that we don't break anything in the process ;)
So once the decision has been made about where to put the new files, I'd be
willing to commit them, assuming that no one objects. Once committed you (or
anyone else who is so inclined) could post follow-up patches to address the
above comments.
> Place holder to attach the long running test which will test Derby's improved
> optimizer
> ---------------------------------------------------------------------------------------
>
> Key: DERBY-2249
> URL: https://issues.apache.org/jira/browse/DERBY-2249
> Project: Derby
> Issue Type: Test
> Components: Test
> Affects Versions: 10.3.0.0
> Reporter: Manjula Kutty
> Assigned To: Manjula Kutty
> Priority: Trivial
> Attachments: build.xml, DERBY-2249_diff.txt, LangTest.zip
>
>
> Will be adding a test for the improved optimizer particularly to test the fix
> for DERBY-805 and DERBY-1205. Once the files are committed will provide a
> link to both of those issues.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.